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