Removed unnecessary type (lifetime)
This commit is contained in:
@@ -239,7 +239,6 @@ impl GetRust for TypeExpr {
|
|||||||
path.get_rust()
|
path.get_rust()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Self::Lifetime(name) => format!("'{}", name.get_rust()),
|
|
||||||
Self::Tuple(types) => format!(
|
Self::Tuple(types) => format!(
|
||||||
"({})",
|
"({})",
|
||||||
types
|
types
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ pub enum TypeExpr {
|
|||||||
Path(Path, Option<Generics>),
|
Path(Path, Option<Generics>),
|
||||||
StaticFn(Vec<TypeExpr>, Option<Box<TypeExpr>>),
|
StaticFn(Vec<TypeExpr>, Option<Box<TypeExpr>>),
|
||||||
Tuple(Vec<TypeExpr>),
|
Tuple(Vec<TypeExpr>),
|
||||||
Lifetime(Identifier),
|
|
||||||
Void,
|
Void,
|
||||||
Fn {
|
Fn {
|
||||||
kind: FnKind,
|
kind: FnKind,
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ impl<'a> TryFrom<pest::iterators::Pair<'a, Rule>> for TypeExpr {
|
|||||||
|
|
||||||
Ok(ty)
|
Ok(ty)
|
||||||
}
|
}
|
||||||
Rule::lifetime => Ok(TypeExpr::Lifetime(inner.next().unwrap().try_into()?)),
|
|
||||||
|
|
||||||
Rule::void_type => Ok(TypeExpr::Void),
|
Rule::void_type => Ok(TypeExpr::Void),
|
||||||
Rule::tuple_type => Ok(TypeExpr::Tuple(collect_recovered(inner)?)),
|
Rule::tuple_type => Ok(TypeExpr::Tuple(collect_recovered(inner)?)),
|
||||||
|
|||||||
Reference in New Issue
Block a user