diff --git a/src/view/progress_bar.rs b/src/view/progress_bar.rs index e29ef04..060ecc7 100644 --- a/src/view/progress_bar.rs +++ b/src/view/progress_bar.rs @@ -7,15 +7,19 @@ use event::*; use theme::ColorStyle; use view::View; +pub type CbPromise = Option>; + /// Display progress. pub struct ProgressBar { min: usize, max: usize, value: Arc, // TODO: use a Promise instead? - callback: Option>>>>, + callback: Option>>, } +new_default!(ProgressBar); + impl ProgressBar { /// Creates a new progress bar. /// @@ -43,7 +47,7 @@ impl ProgressBar { /// /// Whenever `callback` is set, it will be called on the next event loop. pub fn with_callback(mut self, - callback: Arc>>>) + callback: Arc>) -> Self { self.callback = Some(callback); self