docs: fix typos

Found via `typos --format brief`
This commit is contained in:
Kian-Meng Ang
2023-02-02 12:26:17 +08:00
parent a12ac62722
commit a0e2eb38ae
7 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -377,8 +377,8 @@ impl fmt::Display for LogsTz {
}
/// Store the logs alongside a HashSet, each log *should* generate a unique timestamp,
/// so if we store the timestamp seperately in a HashSet, we can then check if we should insert a log line into the
/// stateful list dependant on whethere the timestamp is in the HashSet or not
/// so if we store the timestamp separately in a HashSet, we can then check if we should insert a log line into the
/// stateful list dependent on whethere the timestamp is in the HashSet or not
#[derive(Debug, Clone)]
pub struct Logs {
logs: StatefulList<ListItem<'static>>,
+1 -1
View File
@@ -376,7 +376,7 @@ impl AppData {
.map(|i| i.logs.state())
}
/// Error realted methods
/// Error related methods
/// return single app_state error
pub const fn get_error(&self) -> Option<AppError> {
+1 -1
View File
@@ -62,7 +62,7 @@ pub struct DockerData {
}
impl DockerData {
/// Use docker stats to caluclate current cpu usage
/// Use docker stats to calculate current cpu usage
#[allow(clippy::cast_precision_loss)]
fn calculate_usage(stats: &Stats) -> f64 {
let mut cpu_percentage = 0.0;
+4 -4
View File
@@ -328,7 +328,7 @@ fn make_chart<'a, T: Stats + Display>(
}
/// Draw heading bar at top of program, always visible
/// TODO Should seperate into loading icon/headers/help functions
/// TODO Should separate into loading icon/headers/help functions
#[allow(clippy::too_many_lines)]
pub fn heading_bar<B: Backend>(
area: Rect,
@@ -510,7 +510,7 @@ pub fn help_box<B: Backend>(f: &mut Frame<'_, B>) {
);
help_text.push_str("\n ( q ) to quit at any time");
help_text.push_str("\n mouse scrolling & clicking also available");
help_text.push_str("\n\n currenty an early work in progress, all and any input appreciated");
help_text.push_str("\n\n currently an early work in progress, all and any input appreciated");
help_text.push_str(format!("\n {}", REPO.trim()).as_str());
// Find the maximum line widths & height
@@ -527,7 +527,7 @@ pub fn help_box<B: Backend>(f: &mut Frame<'_, B>) {
.block(Block::default())
.alignment(Alignment::Center);
let description_paragrpah = Paragraph::new(description_text.as_str())
let description_paragraph = Paragraph::new(description_text.as_str())
.style(Style::default().bg(Color::Magenta).fg(Color::Black))
.block(Block::default())
.alignment(Alignment::Center);
@@ -566,7 +566,7 @@ pub fn help_box<B: Backend>(f: &mut Frame<'_, B>) {
// Order is important here
f.render_widget(Clear, area);
f.render_widget(name_paragraph, split_popup[0]);
f.render_widget(description_paragrpah, split_popup[1]);
f.render_widget(description_paragraph, split_popup[1]);
f.render_widget(help_paragraph, split_popup[2]);
f.render_widget(block, area);
}
+1 -1
View File
@@ -273,7 +273,7 @@ impl GuiState {
self.is_loading.insert(uuid);
}
/// If is_loading has any entries, return the current loading_icon, else an emtpy string
/// If is_loading has any entries, return the current loading_icon, else an empty string
pub fn get_loading(&mut self) -> String {
if self.is_loading.is_empty() {
String::from(" ")