From 20d3a3f10265e1d17d2ca0b09d36a1f41b3c54d8 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 14 Mar 2019 09:36:00 +0700 Subject: [PATCH] clippy: Add missing Default impls. --- core-foundation/src/attributed_string.rs | 6 ++++++ core-foundation/src/dictionary.rs | 6 ++++++ core-foundation/src/uuid.rs | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/core-foundation/src/attributed_string.rs b/core-foundation/src/attributed_string.rs index dea20fc..e0fa576 100644 --- a/core-foundation/src/attributed_string.rs +++ b/core-foundation/src/attributed_string.rs @@ -77,3 +77,9 @@ impl CFMutableAttributedString { } } } + +impl Default for CFMutableAttributedString { + fn default() -> Self { + Self::new() + } +} diff --git a/core-foundation/src/dictionary.rs b/core-foundation/src/dictionary.rs index 5b808c3..61f25df 100644 --- a/core-foundation/src/dictionary.rs +++ b/core-foundation/src/dictionary.rs @@ -272,6 +272,12 @@ impl CFMutableDictionary { } } +impl Default for CFMutableDictionary { + fn default() -> Self { + Self::new() + } +} + impl<'a, K, V> From<&'a CFDictionary> for CFMutableDictionary { /// Creates a new mutable dictionary with the key-value pairs from another dictionary. /// The capacity of the new mutable dictionary is not limited. diff --git a/core-foundation/src/uuid.rs b/core-foundation/src/uuid.rs index 8061337..b560bf2 100644 --- a/core-foundation/src/uuid.rs +++ b/core-foundation/src/uuid.rs @@ -38,6 +38,12 @@ impl CFUUID { } } +impl Default for CFUUID { + fn default() -> Self { + Self::new() + } +} + #[cfg(feature = "with-uuid")] impl Into for CFUUID { fn into(self) -> Uuid {