From: Simon Tatham Date: Thu, 28 Dec 2023 11:38:42 +0000 (+0000) Subject: Reduce some of the unused-stuff warnings. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=c808dd710d241e5f9c5a6100719adf53a5041937;p=mastodonochrome.git Reduce some of the unused-stuff warnings. 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. --- diff --git a/src/tui.rs b/src/tui.rs index 181613c..e191aee 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -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, subthread_receiver: std::sync::mpsc::Receiver, 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,