diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-25 12:54:51 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-25 12:54:51 +0100 |
commit | dc568083381d2073f0cfcfad8fa58158bd5bf811 (patch) | |
tree | 3c0655dd65c5912a4cbfd02bb4c9738e62074ccf /src/trait_sig.rs | |
parent | 06a384000b0a6c7b657e4f8a9145b3d4357f3d70 (diff) |
refactor: remove unnecessary TypeOrPath type
Diffstat (limited to 'src/trait_sig.rs')
-rw-r--r-- | src/trait_sig.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/trait_sig.rs b/src/trait_sig.rs index 88aac6a..3fb439f 100644 --- a/src/trait_sig.rs +++ b/src/trait_sig.rs @@ -8,7 +8,7 @@ use syn::{Ident, Signature, TypeImplTrait}; use crate::match_assoc_type; use crate::parse_assoc_type::BoxType; -use crate::syn_utils::{iter_type, trait_bounds, TypeOrPath}; +use crate::syn_utils::{iter_type, trait_bounds}; use crate::transform::{dynamize_function_bounds, TransformError, TypeConverter}; #[derive(Debug, Clone)] @@ -40,9 +40,9 @@ impl From<TransformError> for MethodError { } } -fn filter_map_impl_trait(item: TypeOrPath) -> Option<&TypeImplTrait> { +fn filter_map_impl_trait(item: &Type) -> Option<&TypeImplTrait> { match item { - TypeOrPath::Type(Type::ImplTrait(impltrait)) => Some(impltrait), + Type::ImplTrait(impltrait) => Some(impltrait), _other => None, } } |