From 9d2e72086b8372ad865a84d91807a9f97b37755b Mon Sep 17 00:00:00 2001 From: Jack Wills <32690432+mrjackwills@users.noreply.github.com> Date: Thu, 2 Mar 2023 03:54:55 +0000 Subject: [PATCH] docs: comment typos --- src/app_data/container_state.rs | 2 +- src/app_data/mod.rs | 6 ++---- src/ui/mod.rs | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app_data/container_state.rs b/src/app_data/container_state.rs index aedc613..b1e1ba6 100644 --- a/src/app_data/container_state.rs +++ b/src/app_data/container_state.rs @@ -142,7 +142,7 @@ impl State { _ => Color::Red, } } - // Dirty way to create order for the state, rather than impl Ord + /// Dirty way to create order for the state, rather than impl Ord pub const fn order(self) -> u8 { match self { Self::Running => 0, diff --git a/src/app_data/mod.rs b/src/app_data/mod.rs index 02fdd38..3169b1e 100644 --- a/src/app_data/mod.rs +++ b/src/app_data/mod.rs @@ -203,7 +203,7 @@ impl AppData { self.containers.start(); } - // select the last container + /// select the last container pub fn containers_end(&mut self) { self.containers.end(); } @@ -213,7 +213,7 @@ impl AppData { self.containers.next(); } - // select the previous container + /// select the previous container pub fn containers_previous(&mut self) { self.containers.previous(); } @@ -494,9 +494,7 @@ impl AppData { container.mem_limit.update(mem_limit); } // need to benchmark this? - // if self.get_sorted().is_some() { self.sort_containers(); - // } } /// Update, or insert, containers diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 8d45095..dcbc394 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -1,6 +1,6 @@ use anyhow::Result; use crossterm::{ - event::{self, DisableMouseCapture, Event, EnableMouseCapture}, + event::{self, DisableMouseCapture, Event}, execute, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, }; @@ -96,7 +96,7 @@ impl Ui { Terminal::new(backend) } - // This is a fix for mouse-events being printed to screen, read an event and do nothing with it + /// This is a fix for mouse-events being printed to screen, read an event and do nothing with it fn nullify_event_read(&self) { if crossterm::event::poll(self.input_poll_rate).unwrap_or(true) { event::read().ok();