Skip to content

Commit

Permalink
fixed clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
devkelley committed Jan 4, 2024
1 parent fbed66e commit 9963016
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions proc-macros/src/config_source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ use proc_macro::TokenStream;
use syn::{parse_macro_input, DeriveInput};

use generate::generate;
use parse::parse_input;
use process::process;

use self::parse::parse_input;

/// Implements the ConfigSource derive macro
///
/// # Arguments:
Expand Down
5 changes: 1 addition & 4 deletions proc-macros/src/config_source/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,5 @@ fn path_is_option(path: &Path) -> bool {
/// # Arguments
/// * `ty` - Struct field type to check.
fn is_option(ty: &Type) -> bool {
match ty {
Type::Path(typepath) if typepath.qself.is_none() && path_is_option(&typepath.path) => true,
_ => false,
}
matches!(ty, Type::Path(typepath) if typepath.qself.is_none() && path_is_option(&typepath.path))
}
2 changes: 1 addition & 1 deletion proc-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ use proc_macro::TokenStream;
/// This allows for Structs to be used as a `Source` for configuration through the `config` crate.
#[proc_macro_derive(ConfigSource)]
pub fn config_source(ts: TokenStream) -> TokenStream {
config_source::config_source(ts).into()
config_source::config_source(ts)
}

0 comments on commit 9963016

Please sign in to comment.