summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/cached/src/main.rs38
1 files changed, 19 insertions, 19 deletions
diff --git a/examples/cached/src/main.rs b/examples/cached/src/main.rs
index d7787979..b900ff36 100644
--- a/examples/cached/src/main.rs
+++ b/examples/cached/src/main.rs
@@ -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",
+ }
+ )
+ }
+}