mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-29 13:14:05 +03:00
refactor: use matches! in Type methods
Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
parent
d98ae0a105
commit
153202752f
@ -45,17 +45,11 @@ pub enum Type {
|
||||
|
||||
impl Type {
|
||||
pub fn is_self(&self) -> bool {
|
||||
if let Type::SelfType = self {
|
||||
return true;
|
||||
}
|
||||
false
|
||||
matches!(self, Type::SelfType)
|
||||
}
|
||||
|
||||
pub fn is_circuit(&self) -> bool {
|
||||
if let Type::Circuit(_) = self {
|
||||
return true;
|
||||
}
|
||||
false
|
||||
matches!(self, Type::Circuit(_))
|
||||
}
|
||||
|
||||
pub fn match_array_types(&self, other: &Type) -> bool {
|
||||
|
Loading…
Reference in New Issue
Block a user