diff options
author | Joel Gallant <joel@joelgallant.me> | 2020-09-03 12:06:08 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 12:06:08 -0600 |
commit | 436c964037a1833fe6d17eda37e25425af7e9760 (patch) | |
tree | 5e6468c43f2f06fca2a338839a3d7a80e4d67d49 /src/file/format/mod.rs | |
parent | 2c0b201055be60ec45e258adcc6c4b6e01bcd627 (diff) | |
parent | e84a39949c0c1625c1886b8f718b8165c7a8e831 (diff) |
Merge pull request #134 from eisterman/fix_clippy_warnings
Fix of all the clippy warnings and removing of deprecated Error::description method
Diffstat (limited to 'src/file/format/mod.rs')
-rw-r--r-- | src/file/format/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs index 39b3813..f46ae13 100644 --- a/src/file/format/mod.rs +++ b/src/file/format/mod.rs @@ -72,22 +72,22 @@ lazy_static! { impl FileFormat { // TODO: pub(crate) #[doc(hidden)] - pub fn extensions(&self) -> &'static Vec<&'static str> { + pub fn extensions(self) -> &'static Vec<&'static str> { // It should not be possible for this to fail // A FileFormat would need to be declared without being added to the // ALL_EXTENSIONS map. - ALL_EXTENSIONS.get(self).unwrap() + ALL_EXTENSIONS.get(&self).unwrap() } // TODO: pub(crate) #[doc(hidden)] #[allow(unused_variables)] pub fn parse( - &self, + self, uri: Option<&String>, text: &str, - ) -> Result<HashMap<String, Value>, Box<Error + Send + Sync>> { - match *self { + ) -> Result<HashMap<String, Value>, Box<dyn Error + Send + Sync>> { + match self { #[cfg(feature = "toml")] FileFormat::Toml => toml::parse(uri, text), |