aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 957d424..21efe52 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -400,42 +400,6 @@ impl TypeTransform {
}
}
-/// Just a convenience trait for us to avoid match/if-let blocks everywhere.
-trait As<T> {
- fn get_as(&self) -> Option<&T>;
- fn get_as_mut(&mut self) -> Option<&mut T>;
-}
-
-impl As<AngleBracketedGenericArguments> for PathArguments {
- fn get_as(&self) -> Option<&AngleBracketedGenericArguments> {
- match self {
- PathArguments::AngleBracketed(args) => Some(args),
- _other => None,
- }
- }
- fn get_as_mut(&mut self) -> Option<&mut AngleBracketedGenericArguments> {
- match self {
- PathArguments::AngleBracketed(args) => Some(args),
- _other => None,
- }
- }
-}
-
-impl As<Type> for GenericArgument {
- fn get_as(&self) -> Option<&Type> {
- match self {
- GenericArgument::Type(typearg) => Some(typearg),
- _other => None,
- }
- }
- fn get_as_mut(&mut self) -> Option<&mut Type> {
- match self {
- GenericArgument::Type(typearg) => Some(typearg),
- _other => None,
- }
- }
-}
-
fn path_segment_for_trait(sometrait: &ItemTrait) -> PathSegment {
PathSegment {
ident: sometrait.ident.clone(),