Skip to content

Commit

Permalink
Implement Error for InjectorShutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Feb 17, 2024
1 parent eb0b4f6 commit 21879b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helix-term/src/ui/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ impl<I, D> Clone for Injector<I, D> {
}
}

#[derive(Debug)]
pub struct InjectorShutdown;

impl<T, D> Injector<T, D> {
Expand All @@ -179,6 +180,14 @@ impl<T, D> Injector<T, D> {
}
}

impl std::fmt::Display for InjectorShutdown {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "picker has been shut down")
}
}

impl std::error::Error for InjectorShutdown {}

type ColumnFormatFn<T, D> = for<'a> fn(&'a T, &'a D) -> Cell<'a>;

pub struct Column<T, D> {
Expand Down

0 comments on commit 21879b4

Please sign in to comment.