message: Move declaration of `SortOrder` in `cached` example
diff: @@ -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",
  + }
  + )
  + }
  +}
  