mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Remove unused Type::EnumerationValue
Values are not their own types
This commit is contained in:
parent
9bf686db29
commit
e5302e0b7b
3 changed files with 0 additions and 11 deletions
|
@ -214,7 +214,6 @@ fn to_eval_value<'cx>(
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
Type::Enumeration(_) => todo!(),
|
Type::Enumeration(_) => todo!(),
|
||||||
Type::EnumerationValue(_) => todo!(),
|
|
||||||
Type::Invalid
|
Type::Invalid
|
||||||
| Type::Void
|
| Type::Void
|
||||||
| Type::Builtin(_)
|
| Type::Builtin(_)
|
||||||
|
|
|
@ -794,7 +794,6 @@ impl Expression {
|
||||||
Type::Enumeration(enumeration) => {
|
Type::Enumeration(enumeration) => {
|
||||||
Expression::EnumerationValue(enumeration.clone().default_value())
|
Expression::EnumerationValue(enumeration.clone().default_value())
|
||||||
}
|
}
|
||||||
Type::EnumerationValue(_) => Expression::Invalid,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,7 @@ pub enum Type {
|
||||||
fields: BTreeMap<String, Type>,
|
fields: BTreeMap<String, Type>,
|
||||||
name: Option<String>,
|
name: Option<String>,
|
||||||
},
|
},
|
||||||
|
|
||||||
Enumeration(Rc<Enumeration>),
|
Enumeration(Rc<Enumeration>),
|
||||||
EnumerationValue(EnumerationValue),
|
|
||||||
|
|
||||||
ElementReference,
|
ElementReference,
|
||||||
}
|
}
|
||||||
|
@ -89,9 +87,6 @@ impl core::cmp::PartialEq for Type {
|
||||||
matches!(other, Type::Object{fields: f, name: n} if fields == f && name == n)
|
matches!(other, Type::Object{fields: f, name: n} if fields == f && name == n)
|
||||||
}
|
}
|
||||||
Type::Enumeration(lhs) => matches!(other, Type::Enumeration(rhs) if lhs == rhs),
|
Type::Enumeration(lhs) => matches!(other, Type::Enumeration(rhs) if lhs == rhs),
|
||||||
Type::EnumerationValue(lhs) => {
|
|
||||||
matches!(other, Type::EnumerationValue(rhs) if lhs == rhs)
|
|
||||||
}
|
|
||||||
Type::ElementReference => matches!(other, Type::ElementReference),
|
Type::ElementReference => matches!(other, Type::ElementReference),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,9 +148,6 @@ impl Display for Type {
|
||||||
Type::PathElements => write!(f, "pathelements"),
|
Type::PathElements => write!(f, "pathelements"),
|
||||||
Type::Easing => write!(f, "easing"),
|
Type::Easing => write!(f, "easing"),
|
||||||
Type::Enumeration(enumeration) => write!(f, "enum {}", enumeration.name),
|
Type::Enumeration(enumeration) => write!(f, "enum {}", enumeration.name),
|
||||||
Type::EnumerationValue(value) => {
|
|
||||||
write!(f, "enum {}::{}", value.enumeration.name, value.to_string())
|
|
||||||
}
|
|
||||||
Type::ElementReference => write!(f, "element ref"),
|
Type::ElementReference => write!(f, "element ref"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -368,7 +360,6 @@ impl Type {
|
||||||
Type::Array(_) => None,
|
Type::Array(_) => None,
|
||||||
Type::Object { .. } => None,
|
Type::Object { .. } => None,
|
||||||
Type::Enumeration(_) => None,
|
Type::Enumeration(_) => None,
|
||||||
Type::EnumerationValue(_) => None,
|
|
||||||
Type::ElementReference => None,
|
Type::ElementReference => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue