diff options
author | HampusM <hampus@hampusmat.com> | 2023-01-13 21:14:03 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-01-13 21:14:03 +0100 |
commit | 45533a946c296a3a748a645fb80869f93ad7f09a (patch) | |
tree | 529bf5f41579d80b8cc50613b90250b652acf0d9 /macros/src/injectable/dependency.rs | |
parent | 133069545b0f2a1fd28b44750934cab13be5a953 (diff) |
refactor: put syn_path_to_string in a extension trait
Diffstat (limited to 'macros/src/injectable/dependency.rs')
-rw-r--r-- | macros/src/injectable/dependency.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/src/injectable/dependency.rs b/macros/src/injectable/dependency.rs index 314a369..d9d904e 100644 --- a/macros/src/injectable/dependency.rs +++ b/macros/src/injectable/dependency.rs @@ -2,7 +2,7 @@ use proc_macro2::Ident; use syn::{parse2, FnArg, GenericArgument, LitStr, PathArguments, Type}; use crate::injectable::named_attr_input::NamedAttrInput; -use crate::util::syn_path::syn_path_to_string; +use crate::util::syn_path::SynPathExt; /// Interface for a representation of a dependency of a injectable type. /// @@ -79,7 +79,7 @@ impl IDependency for Dependency attr.path.get_ident().map_or_else( || false, |attr_ident| attr_ident.to_string().as_str() == "named", - ) || syn_path_to_string(&attr.path) == "syrette::named" + ) || &attr.path.to_string() == "syrette::named" }); let opt_named_attr_tokens = opt_named_attr.map(|attr| &attr.tokens); |