diff options
author | Nathan Vegdahl | 2021-07-01 18:57:12 +0000 |
---|---|---|
committer | Nathan Vegdahl | 2021-07-02 02:06:52 +0000 |
commit | efa3389b6aa4e07982e1e902b0173d1daa4a301e (patch) | |
tree | ea0d826cf4f191422b56ee9a5e9b7dad650af296 /helix-term/src/ui/popup.rs | |
parent | 702a0491db0fef8ee15cd6fcff3138812da2c2aa (diff) |
Fix unused variable, parameter, and `mut` warnings in helix-term.
Diffstat (limited to 'helix-term/src/ui/popup.rs')
-rw-r--r-- | helix-term/src/ui/popup.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/helix-term/src/ui/popup.rs b/helix-term/src/ui/popup.rs index fc178af0..29ffb4ad 100644 --- a/helix-term/src/ui/popup.rs +++ b/helix-term/src/ui/popup.rs @@ -52,7 +52,7 @@ impl<T: Component> Component for Popup<T> { fn handle_event(&mut self, event: Event, cx: &mut Context) -> EventResult { let key = match event { Event::Key(event) => event, - Event::Resize(width, height) => { + Event::Resize(_, _) => { // TODO: calculate inner area, call component's handle_event with that area return EventResult::Ignored; } @@ -94,7 +94,7 @@ impl<T: Component> Component for Popup<T> { // tab/enter/ctrl-k or whatever will confirm the selection/ ctrl-n/ctrl-p for scroll. } - fn required_size(&mut self, viewport: (u16, u16)) -> Option<(u16, u16)> { + fn required_size(&mut self, _viewport: (u16, u16)) -> Option<(u16, u16)> { let (width, height) = self .contents .required_size((120, 26)) // max width, max height @@ -130,7 +130,6 @@ impl<T: Component> Component for Popup<T> { rel_y += 1 // position below point } - let area = Rect::new(rel_x, rel_y, width, height); // clip to viewport let area = viewport.intersection(Rect::new(rel_x, rel_y, width, height)); |