Skip to content

Commit 034e219

Browse files
authored
Fix typos (#75)
Found via `typos --hidden --format brief`
1 parent aa69538 commit 034e219

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

oryx-tui/src/section.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl Section {
279279
&mut self,
280280
frame: &mut Frame,
281281
block: Rect,
282-
network_interace: &str,
282+
network_interface: &str,
283283
active_popup: Option<&ActivePopup>,
284284
) {
285285
let (section_block, help_block) = {
@@ -299,7 +299,7 @@ impl Section {
299299
FocusedSection::Inspection => self.inspection.render(frame, section_block),
300300
FocusedSection::Stats => {
301301
if let Some(stats) = &self.stats {
302-
stats.render(frame, section_block, network_interace)
302+
stats.render(frame, section_block, network_interface)
303303
}
304304
}
305305
FocusedSection::Metrics => self.metrics.render(frame, section_block),

oryx-tui/src/section/inspection.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct Inspection {
3030
pub packets: Arc<RwLock<Vec<AppPacket>>>,
3131
pub state: TableState,
3232
pub fuzzy: Arc<Mutex<Fuzzy>>,
33-
pub manuall_scroll: bool,
33+
pub manual_scroll: bool,
3434
pub packet_end_index: usize,
3535
pub packet_window_size: usize,
3636
pub packet_index: Option<usize>,
@@ -42,7 +42,7 @@ impl Inspection {
4242
packets: packets.clone(),
4343
state: TableState::default(),
4444
fuzzy: Fuzzy::new(packets.clone()),
45-
manuall_scroll: false,
45+
manual_scroll: false,
4646
packet_end_index: 0,
4747
packet_window_size: 0,
4848
packet_index: None,
@@ -73,8 +73,8 @@ impl Inspection {
7373
KeyCode::Esc => {
7474
if !fuzzy.is_paused() {
7575
fuzzy.pause();
76-
} else if self.manuall_scroll {
77-
self.manuall_scroll = false;
76+
} else if self.manual_scroll {
77+
self.manual_scroll = false;
7878
} else {
7979
fuzzy.disable();
8080
}
@@ -87,8 +87,8 @@ impl Inspection {
8787
} else {
8888
match key_event.code {
8989
KeyCode::Char('j') | KeyCode::Down => {
90-
if !self.manuall_scroll {
91-
self.manuall_scroll = true;
90+
if !self.manual_scroll {
91+
self.manual_scroll = true;
9292
fuzzy.packet_end_index = fuzzy.packets.len();
9393
}
9494
fuzzy.scroll_down(self.packet_window_size);
@@ -100,8 +100,8 @@ impl Inspection {
100100
}
101101

102102
KeyCode::Char('k') | KeyCode::Up => {
103-
if !self.manuall_scroll {
104-
self.manuall_scroll = true;
103+
if !self.manual_scroll {
104+
self.manual_scroll = true;
105105
fuzzy.packet_end_index = fuzzy.packets.len();
106106
}
107107
fuzzy.scroll_up(self.packet_window_size);
@@ -115,8 +115,8 @@ impl Inspection {
115115
} else {
116116
match key_event.code {
117117
KeyCode::Esc => {
118-
if self.manuall_scroll {
119-
self.manuall_scroll = false;
118+
if self.manual_scroll {
119+
self.manual_scroll = false;
120120
}
121121
}
122122

@@ -170,9 +170,9 @@ impl Inspection {
170170

171171
pub fn scroll_up(&mut self) {
172172
let app_packets = self.packets.read().unwrap();
173-
if !self.manuall_scroll {
174-
self.manuall_scroll = true;
175-
// Record the last position. Usefull for selecting the packets to display
173+
if !self.manual_scroll {
174+
self.manual_scroll = true;
175+
// Record the last position. Useful for selecting the packets to display
176176
self.packet_end_index = app_packets.len();
177177
}
178178
let i = match self.state.selected() {
@@ -196,8 +196,8 @@ impl Inspection {
196196
pub fn scroll_down(&mut self) {
197197
let app_packets = self.packets.read().unwrap();
198198

199-
if !self.manuall_scroll {
200-
self.manuall_scroll = true;
199+
if !self.manual_scroll {
200+
self.manual_scroll = true;
201201
self.packet_end_index = app_packets.len();
202202
}
203203
let i = match self.state.selected() {
@@ -277,7 +277,7 @@ impl Inspection {
277277
fuzzy.packet_end_index = window_size;
278278
}
279279

280-
let packets_to_display = match self.manuall_scroll {
280+
let packets_to_display = match self.manual_scroll {
281281
true => {
282282
if fuzzy.is_enabled() & !fuzzy.filter.value().is_empty() {
283283
if fuzzy_packets.len() > window_size {
@@ -592,7 +592,7 @@ impl Inspection {
592592
};
593593

594594
// Always select the last packet
595-
if !self.manuall_scroll {
595+
if !self.manual_scroll {
596596
if fuzzy.is_enabled() {
597597
fuzzy.scroll_state.select(Some(packets_to_display.len()));
598598
} else {
@@ -610,7 +610,7 @@ impl Inspection {
610610
Line::from("Protocol").centered(),
611611
Line::from("Pid").centered(),
612612
{
613-
if self.manuall_scroll {
613+
if self.manual_scroll {
614614
Line::from("󰹆").centered().yellow()
615615
} else {
616616
Line::from("").centered()
@@ -640,7 +640,7 @@ impl Inspection {
640640

641641
let mut scrollbar_state = if fuzzy.is_enabled() && fuzzy_packets.len() > window_size {
642642
ScrollbarState::new(fuzzy_packets.len()).position({
643-
if self.manuall_scroll {
643+
if self.manual_scroll {
644644
if fuzzy.packet_end_index == window_size {
645645
0
646646
} else {
@@ -652,7 +652,7 @@ impl Inspection {
652652
})
653653
} else if !fuzzy.is_enabled() && app_packets.len() > window_size {
654654
ScrollbarState::new(app_packets.len()).position({
655-
if self.manuall_scroll {
655+
if self.manual_scroll {
656656
if self.packet_end_index == window_size {
657657
0
658658
} else {

0 commit comments

Comments
 (0)