diff options
author | Federico Pasqua <federico.pasqua.96@gmail.com> | 2020-03-14 15:46:36 +0100 |
---|---|---|
committer | Federico Pasqua <federico.pasqua.96@gmail.com> | 2020-03-14 16:01:54 +0100 |
commit | 57fb2610ad274dff1d2f2e4d43dfce05ca9c4835 (patch) | |
tree | 45e4c5c57df0eea23e8977de0984965d9a8a56b4 /src/source.rs | |
parent | 2c0b201055be60ec45e258adcc6c4b6e01bcd627 (diff) |
General upgrade for clippy fix and remove of deprecated methods for errors
Diffstat (limited to 'src/source.rs')
-rw-r--r-- | src/source.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/source.rs b/src/source.rs index e4c4972..4d1ba53 100644 --- a/src/source.rs +++ b/src/source.rs @@ -7,7 +7,7 @@ use value::{Value, ValueKind}; /// Describes a generic _source_ of configuration properties. pub trait Source: Debug { - fn clone_into_box(&self) -> Box<Source + Send + Sync>; + fn clone_into_box(&self) -> Box<dyn Source + Send + Sync>; /// Collect all configuration properties available from this source and return /// a HashMap. @@ -35,14 +35,14 @@ pub trait Source: Debug { } } -impl Clone for Box<Source + Send + Sync> { - fn clone(&self) -> Box<Source + Send + Sync> { +impl Clone for Box<dyn Source + Send + Sync> { + fn clone(&self) -> Box<dyn Source + Send + Sync> { self.clone_into_box() } } -impl Source for Vec<Box<Source + Send + Sync>> { - fn clone_into_box(&self) -> Box<Source + Send + Sync> { +impl Source for Vec<Box<dyn Source + Send + Sync>> { + fn clone_into_box(&self) -> Box<dyn Source + Send + Sync> { Box::new((*self).clone()) } @@ -67,7 +67,7 @@ where T: Clone, T: 'static, { - fn clone_into_box(&self) -> Box<Source + Send + Sync> { + fn clone_into_box(&self) -> Box<dyn Source + Send + Sync> { Box::new((*self).clone()) } |