diff options
author | rabite <rabite@posteo.de> | 2020-01-23 20:44:10 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2020-01-23 20:44:10 +0100 |
commit | 8fc070b71b0347faa514f3e82f80b009c77201d1 (patch) | |
tree | b612d1c6101e45ce3e475a1a8dfdeb44fe63db01 /src/tabview.rs | |
parent | cd773727ebd3fe76f776598b55b3d1f22e8e2b87 (diff) |
speedup: make hunter handle directories with 1M files
Diffstat (limited to 'src/tabview.rs')
-rw-r--r-- | src/tabview.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tabview.rs b/src/tabview.rs index 0b3ca93..388740f 100644 --- a/src/tabview.rs +++ b/src/tabview.rs @@ -5,6 +5,7 @@ use crate::fail::{HResult, HError, ErrorLog}; use crate::coordinates::Coordinates; pub trait Tabbable { + type Tab: Widget; fn new_tab(&mut self) -> HResult<()>; fn close_tab(&mut self) -> HResult<()>; fn next_tab(&mut self) -> HResult<()>; @@ -14,8 +15,8 @@ pub trait Tabbable { Ok(()) } fn get_tab_names(&self) -> Vec<Option<String>>; - fn active_tab(&self) -> &dyn Widget; - fn active_tab_mut(&mut self) -> &mut dyn Widget; + fn active_tab(&self) -> &Self::Tab; + fn active_tab_mut(&mut self) -> &mut Self::Tab; fn on_key_sub(&mut self, key: Key) -> HResult<()>; fn on_key(&mut self, key: Key) -> HResult<()> { self.on_key_sub(key) |