Skip to content

Commit

Permalink
Derive Display for Reflection Events
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Reiter committed Sep 28, 2024
1 parent a0b4844 commit 22b0031
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wireman/src/events/selection/reflection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ pub enum ReflectionEvents {
TriggerReflection,
}

impl std::fmt::Display for ReflectionEvents {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let display_str = match self {
ReflectionEvents::TriggerReflection => "Reflect server",
ReflectionEvents::CloseDialog => "Close dialog",
};
write!(f, "{display_str}")
}
}

pub struct ReflectionDialogEventHandler;

impl EventHandler for ReflectionDialogEventHandler {
Expand Down

0 comments on commit 22b0031

Please sign in to comment.