chiark / gitweb /
Reduce some of the unused-stuff warnings.
authorSimon Tatham <anakin@pobox.com>
Thu, 28 Dec 2023 11:38:42 +0000 (11:38 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 28 Dec 2023 11:38:42 +0000 (11:38 +0000)
Perhaps I should turn all these warnings off until I've actually used
all the unused stuff? I'm sure they're very useful once your program
is supposed to be finished, but while it's still only half-written,
yes I _know_ I haven't got round to using all these fields yet.

src/tui.rs

index 181613ce19ffd3cd67e3a424f1f85ec285e13e09..e191aeefa9934bea1bd1a877a3c1ffc8e70c88bc 100644 (file)
@@ -14,10 +14,9 @@ use std::io::{Stdout, Write, stdout};
 use unicode_width::UnicodeWidthStr;
 
 use super::activity_stack::*;
-use super::client::Client;
+//use super::client::Client;
 use super::coloured_string::{ColouredString, ColouredStringSlice};
 use super::menu::*;
-use super::text::{parse_html, Paragraph, TextFragment};
 
 fn ratatui_style_from_colour(colour: char) -> Style {
     match colour {
@@ -131,6 +130,7 @@ pub struct Tui {
     subthread_sender: std::sync::mpsc::SyncSender<SubthreadEvent>,
     subthread_receiver: std::sync::mpsc::Receiver<SubthreadEvent>,
     state: TuiLogicalState,
+    // FIXME: we'll need a Client here
 }
 
 #[derive(Eq, PartialEq, Debug, Clone, Copy)]
@@ -239,7 +239,7 @@ impl Tui {
             })?;
 
             match self.subthread_receiver.recv() {
-                e @ Err(_) => break Ok(()), // FIXME FIXME FIXME: not ok!
+                _e @ Err(_) => break Ok(()), // FIXME FIXME FIXME: not ok!
                 Ok(SubthreadEvent::TermEv(ev)) => {
                     match ev {
                         Event::Key(key) => {
@@ -327,8 +327,6 @@ impl TuiLogicalState {
     }
 
     fn handle_keypress(&mut self, key: OurKey) -> HandleEventResult {
-        dbg!(key);
-
         match key {
             // FIXME: ESC should really go to the utilities menu
             OurKey::Escape => HandleEventResult::Exit,