Skip to content

Commit fb65424

Browse files
committed
update codestyle
1 parent ff5a8e6 commit fb65424

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
commit ff5a8e66537532d024f058d6ceb81455a32aa127
2+
Author: Alexeev Bronislav <[email protected]>
3+
Date: Tue Aug 5 17:13:55 2025 +0700
4+
5+
fix readme
6+
17
commit 9cc2858ec868e3612a30547fa98d7cc83fa6e3c2
28
Author: Alexeev Bronislav <[email protected]>
39
Date: Fri Jul 25 09:44:58 2025 +0700

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn main() -> Result<()> {
5151

5252
#[cfg(test)]
5353
mod cli_tests {
54-
54+
5555
use std::process::Command;
5656

5757
#[test]

src/man_db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl ManDb {
194194
#[cfg(test)]
195195
mod man_db_tests {
196196
use super::*;
197-
197+
198198
use tokio::runtime::Runtime;
199199

200200
#[test]

src/tui.rs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ use crossterm::{
66
KeyModifiers,
77
},
88
execute,
9-
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
9+
terminal::{EnterAlternateScreen, LeaveAlternateScreen, disable_raw_mode, enable_raw_mode},
1010
};
1111
use std::sync::Arc;
1212
use std::time::{Duration, Instant};
1313
use tui::{
14+
Terminal,
1415
backend::CrosstermBackend,
1516
layout::{Constraint, Direction, Layout, Rect},
1617
style::{Color, Modifier, Style},
1718
text::{Span, Spans},
1819
widgets::{Block, Borders, List, ListItem, ListState, Paragraph, Wrap},
19-
Terminal,
2020
};
2121

2222
const PAGE_SIZE: usize = 30;
@@ -352,9 +352,7 @@ fn handle_man_page_keys(app: &mut AppState, key: KeyEvent) {
352352
KeyCode::Up => app.man_page.scroll = app.man_page.scroll.saturating_sub(1),
353353
KeyCode::Down => app.man_page.scroll = app.man_page.scroll.saturating_add(1),
354354
KeyCode::Home => app.man_page.scroll = 0,
355-
KeyCode::End => {
356-
app.man_page.scroll = app.man_page.content.len().saturating_sub(PAGE_SIZE)
357-
}
355+
KeyCode::End => app.man_page.scroll = app.man_page.content.len().saturating_sub(PAGE_SIZE),
358356
KeyCode::PageUp => app.man_page.scroll = app.man_page.scroll.saturating_sub(PAGE_SIZE),
359357
KeyCode::PageDown => {
360358
app.man_page.scroll = (app.man_page.scroll + PAGE_SIZE)
@@ -445,7 +443,7 @@ fn render_ui<B: tui::backend::Backend>(f: &mut tui::Frame<B>, app: &mut AppState
445443
Constraint::Length(3),
446444
Constraint::Min(10),
447445
]
448-
.as_ref(),
446+
.as_ref(),
449447
)
450448
.split(f.size());
451449

@@ -463,16 +461,14 @@ fn render_status_bar<B: tui::backend::Backend>(f: &mut tui::Frame<B>, app: &AppS
463461
let status = if app.loading {
464462
format!("Loading {source_label}...")
465463
} else {
466-
let x = &*format!(
467-
"RTFM // {source_label} PAGE [Tab:Switch /:Search t:Toggle Home/End]"
468-
);
464+
let x = &*format!("RTFM // {source_label} PAGE [Tab:Switch /:Search t:Toggle Home/End]");
469465
match app.focus {
470466
Focus::CommandList => "RTFM // COMMAND LIST [Tab:Switch Home/End]",
471467
Focus::ManPage => x,
472468
Focus::Search => "RTFM // SEARCH MODE [Enter:Apply Esc:Cancel]",
473469
}
474-
.parse()
475-
.unwrap()
470+
.parse()
471+
.unwrap()
476472
};
477473

478474
let status_bar = Paragraph::new(status)
@@ -705,4 +701,4 @@ fn syntax_highlight(line: &str) -> Vec<Span> {
705701
}
706702

707703
spans
708-
}
704+
}

0 commit comments

Comments
 (0)