mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Make the Value non_exhaustive
This commit is contained in:
parent
a203097b88
commit
5a416d0fc7
2 changed files with 3 additions and 6 deletions
|
@ -286,11 +286,7 @@ fn to_js_value<'cx>(
|
|||
&format!("#{:02x}{:02x}{:02x}{:02x}", c.red(), c.green(), c.blue(), c.alpha()),
|
||||
)
|
||||
.as_value(cx),
|
||||
Value::Brush(_)
|
||||
| Value::PathElements(_)
|
||||
| Value::EasingCurve(_)
|
||||
| Value::EnumerationValue(..)
|
||||
| Value::Model(_) => todo!("converting {:?} to js has not been implemented", val),
|
||||
_ => todo!("converting {:?} to js has not been implemented", val),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -101,9 +101,10 @@ impl PartialEq for ModelPtr {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
/// This is a dynamically typed Value used in the interpreter, it need to be able
|
||||
/// to be converted from and to anything that can be stored in a Property
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum Value {
|
||||
/// There is nothing in this value. That's the default.
|
||||
/// For example, a function that do not return a result would return a Value::Void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue