diff options
author | Radosław Kot <rdkt13@gmail.com> | 2021-10-17 09:36:12 +0200 |
---|---|---|
committer | Radosław Kot <rdkt13@gmail.com> | 2021-10-23 16:58:41 +0200 |
commit | 5ba9013b425b2d54b56a0f67149ceb2c50781638 (patch) | |
tree | 1754a84bef73cde196ba32115d2cb1c68ba02153 /src | |
parent | 583a47764a93465ce8d846a6a7273a9bd38fd554 (diff) |
Apply clippy lints and format
Diffstat (limited to 'src')
-rw-r--r-- | src/file/format/mod.rs | 6 | ||||
-rw-r--r-- | src/format.rs | 5 | ||||
-rw-r--r-- | src/lib.rs | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs index a335426..d5414f5 100644 --- a/src/file/format/mod.rs +++ b/src/file/format/mod.rs @@ -6,7 +6,7 @@ use std::collections::HashMap; use std::error::Error; use crate::map::Map; -use crate::{value::Value, Format, file::extension::FileExtensions}; +use crate::{file::extension::FileExtensions, value::Value, Format}; #[cfg(feature = "toml")] mod toml; @@ -85,14 +85,14 @@ lazy_static! { } impl FileFormat { - pub (crate) fn extensions(&self) -> &'static [&'static str] { + pub(crate) fn extensions(&self) -> &'static [&'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() } - pub (crate) fn parse( + pub(crate) fn parse( &self, uri: Option<&String>, text: &str, diff --git a/src/format.rs b/src/format.rs index 279b4ab..ab9e4fa 100644 --- a/src/format.rs +++ b/src/format.rs @@ -1,7 +1,6 @@ -use std::{collections::HashMap, error::Error}; +use std::error::Error; -use crate::value::Value; -use crate::map::Map; +use crate::{map::Map, value::Value}; /// Describes a format of configuration source data /// @@ -56,8 +56,8 @@ mod de; mod env; mod error; mod file; -mod map; mod format; +mod map; mod path; mod ser; mod source; @@ -68,9 +68,9 @@ pub use crate::builder::ConfigBuilder; pub use crate::config::Config; pub use crate::env::Environment; pub use crate::error::ConfigError; -pub use crate::map::Map; pub use crate::file::{File, FileExtensions, FileFormat, FileSourceFile, FileSourceString}; pub use crate::format::Format; +pub use crate::map::Map; pub use crate::source::AsyncSource; pub use crate::source::Source; pub use crate::value::Value; |