chore: Remove dead code
This commit is contained in:
parent
fa8764984f
commit
1b5a9b8159
2 changed files with 0 additions and 26 deletions
|
@ -1,7 +0,0 @@
|
|||
use druid::{Data, Widget, WidgetPod};
|
||||
|
||||
pub struct Container<T> {
|
||||
child: WidgetPod<T, Box<dyn Widget<T>>>,
|
||||
}
|
||||
|
||||
impl<T: Data> Container<T> {}
|
|
@ -2,11 +2,8 @@ use std::path::PathBuf;
|
|||
use std::sync::Arc;
|
||||
|
||||
use druid::text::Formatter;
|
||||
use druid::widget::{TextBoxEvent, ValidationDelegate};
|
||||
use druid::EventCtx;
|
||||
use druid::{Data, Widget};
|
||||
|
||||
pub mod container;
|
||||
pub mod controller;
|
||||
|
||||
pub trait ExtraWidgetExt<T: Data>: Widget<T> + Sized + 'static {}
|
||||
|
@ -39,19 +36,3 @@ impl Formatter<Arc<PathBuf>> for PathBufFormatter {
|
|||
Ok(Arc::new(p))
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TextBoxOnChanged<F: Fn(&mut EventCtx, &str)>(F);
|
||||
|
||||
impl<F: Fn(&mut EventCtx, &str)> TextBoxOnChanged<F> {
|
||||
pub fn new(f: F) -> Self {
|
||||
Self(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<F: Fn(&mut EventCtx, &str)> ValidationDelegate for TextBoxOnChanged<F> {
|
||||
fn event(&mut self, ctx: &mut EventCtx, event: TextBoxEvent, current_text: &str) {
|
||||
if let TextBoxEvent::Complete = event {
|
||||
(self.0)(ctx, current_text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue