mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
janitor: use the new default attribute for enums
This commit is contained in:
parent
7e77a2a4cc
commit
7122d22c88
10 changed files with 28 additions and 97 deletions
|
@ -326,20 +326,15 @@ impl Component {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Default)]
|
||||
pub enum PropertyVisibility {
|
||||
#[default]
|
||||
Private,
|
||||
Input,
|
||||
Output,
|
||||
InOut,
|
||||
}
|
||||
|
||||
impl Default for PropertyVisibility {
|
||||
fn default() -> Self {
|
||||
Self::Private
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for PropertyVisibility {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue