Move declaration of SortOrder in cached example
This commit is contained in:
parent
1fb84ae5d3
commit
0e295be891
1 changed files with 19 additions and 19 deletions
|
|
@ -12,25 +12,6 @@ pub fn main() -> iced::Result {
|
|||
App::run(Settings::default())
|
||||
}
|
||||
|
||||
#[derive(Hash)]
|
||||
enum SortOrder {
|
||||
Ascending,
|
||||
Descending,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for SortOrder {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
match self {
|
||||
Self::Ascending => "Ascending",
|
||||
Self::Descending => "Descending",
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
struct App {
|
||||
options: HashSet<String>,
|
||||
input: String,
|
||||
|
|
@ -139,3 +120,22 @@ impl Sandbox for App {
|
|||
.into()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Hash)]
|
||||
enum SortOrder {
|
||||
Ascending,
|
||||
Descending,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for SortOrder {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
match self {
|
||||
Self::Ascending => "Ascending",
|
||||
Self::Descending => "Descending",
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue