Skip to content

Commit 9ba609e

Browse files
committed
update deps
1 parent 4ab556b commit 9ba609e

11 files changed

+400
-337
lines changed

Cargo.lock

+372-284
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+13-12
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,23 @@ name = "ig"
1616
path = "src/main.rs"
1717

1818
[dependencies]
19-
grep = "0.2.8"
20-
ignore = "0.4.18"
19+
grep = "0.3.1"
20+
ignore = "0.4.22"
2121
clap = { version = "3.1.6", features = ["derive", "env"] }
22-
crossterm = "0.23.0"
23-
ratatui = { version = "0.21.0", default-features = false, features = ['crossterm'] }
24-
unicode-width = "0.1"
25-
itertools = "0.10.0"
26-
anyhow = "1.0.38"
27-
strum = { version = "0.24", features = ["derive"] }
28-
strum_macros = "0.24.0"
22+
crossterm = "0.27.0"
23+
ratatui = { version = "0.26.1", default-features = false, features = [
24+
'crossterm',
25+
] }
26+
unicode-width = "0.1.11"
27+
itertools = "0.12.1"
28+
anyhow = "1.0.82"
29+
strum = { version = "0.26.2", features = ["derive"] }
2930
syntect = "5.0.0"
3031

3132
[dev-dependencies]
3233
lazy_static = "1.4.0"
33-
test-case = "2.0.0"
34-
mockall = "0.11.0"
34+
test-case = "3.3.1"
35+
mockall = "0.12.1"
3536

3637
[build-dependencies]
37-
anyhow = "1.0.38"
38+
anyhow = "1.0.82"

src/app.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,7 @@ impl App {
9999
Ok(())
100100
}
101101

102-
fn draw(
103-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
104-
app: &mut App,
105-
input_handler: &InputHandler,
106-
) {
102+
fn draw(frame: &mut Frame, app: &mut App, input_handler: &InputHandler) {
107103
let chunks = Layout::default()
108104
.direction(Direction::Vertical)
109105
.constraints([Constraint::Min(1), Constraint::Length(1)].as_ref())

src/editor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77
io,
88
process::{Child, Command},
99
};
10-
use strum_macros::Display;
10+
use strum::Display;
1111

1212
#[derive(Display, Default, PartialEq, Eq, Copy, Clone, Debug, ArgEnum)]
1313
#[strum(serialize_all = "lowercase")]

src/ui/bottom_bar.rs

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use ratatui::{
2-
backend::CrosstermBackend,
32
layout::{Alignment, Constraint, Direction, Layout, Rect},
43
style::Style,
54
text::Span,
@@ -16,7 +15,7 @@ use super::{
1615
};
1716

1817
pub fn draw(
19-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
18+
frame: &mut Frame,
2019
area: Rect,
2120
result_list: &ResultList,
2221
ig: &Ig,
@@ -44,12 +43,7 @@ pub fn draw(
4443
draw_selected_info(frame, hsplit[3], selected_info_text, theme);
4544
}
4645

47-
fn draw_app_status(
48-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
49-
area: Rect,
50-
ig: &Ig,
51-
theme: &dyn Theme,
52-
) {
46+
fn draw_app_status(frame: &mut Frame, area: Rect, ig: &Ig, theme: &dyn Theme) {
5347
let (app_status_text, app_status_style) = if ig.is_searching() {
5448
("SEARCHING", theme.searching_state_style())
5549
} else if ig.last_error().is_some() {
@@ -68,7 +62,7 @@ fn draw_app_status(
6862
}
6963

7064
fn draw_search_result_summary(
71-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
65+
frame: &mut Frame,
7266
area: Rect,
7367
ig: &Ig,
7468
result_list: &ResultList,
@@ -112,7 +106,7 @@ fn draw_search_result_summary(
112106
}
113107

114108
fn draw_current_input(
115-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
109+
frame: &mut Frame,
116110
area: Rect,
117111
input_handler: &InputHandler,
118112
theme: &dyn Theme,
@@ -145,7 +139,7 @@ fn render_selected_info_text(result_list: &ResultList) -> String {
145139
}
146140

147141
fn draw_selected_info(
148-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
142+
frame: &mut Frame,
149143
area: Rect,
150144
selected_info_text: String,
151145
theme: &dyn Theme,

src/ui/context_viewer.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use std::{
88
use clap::ValueEnum;
99
use itertools::Itertools;
1010
use ratatui::{
11-
backend::CrosstermBackend,
1211
layout::{Constraint, Direction, Layout, Rect},
1312
style::{Color, Style},
1413
text::{Line, Span},
@@ -150,13 +149,7 @@ impl ContextViewer {
150149
}
151150
}
152151

153-
pub fn draw(
154-
&self,
155-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
156-
area: Rect,
157-
result_list: &ResultList,
158-
theme: &dyn Theme,
159-
) {
152+
pub fn draw(&self, frame: &mut Frame, area: Rect, result_list: &ResultList, theme: &dyn Theme) {
160153
let block_widget = Block::default()
161154
.borders(Borders::ALL)
162155
.border_type(BorderType::Rounded);

src/ui/input_handler.rs

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ impl InputHandler {
5656
KeyEvent {
5757
code: KeyCode::Char('c'),
5858
modifiers: KeyModifiers::CONTROL,
59+
..
5960
} => app.on_exit(),
6061
KeyEvent {
6162
code: KeyCode::Char(character),
@@ -77,6 +78,7 @@ impl InputHandler {
7778
| KeyEvent {
7879
code: KeyCode::Char('c'),
7980
modifiers: KeyModifiers::CONTROL,
81+
..
8082
}
8183
| KeyEvent {
8284
code: KeyCode::F(5),
@@ -88,6 +90,7 @@ impl InputHandler {
8890
KeyEvent {
8991
code: KeyCode::Char(c),
9092
modifiers: modifier,
93+
..
9194
} => {
9295
if modifier == KeyModifiers::SHIFT {
9396
app.on_char_inserted(c.to_ascii_uppercase());

src/ui/keymap_popup.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use ratatui::{
2-
backend::CrosstermBackend,
32
layout::{Alignment, Rect},
43
text::Text,
54
widgets::{Block, Borders, Clear, Padding, Paragraph},
@@ -51,11 +50,7 @@ impl KeymapPopup {
5150
self.scroll_x = self.scroll_x.saturating_sub(1);
5251
}
5352

54-
pub fn draw(
55-
&mut self,
56-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
57-
theme: &dyn Theme,
58-
) {
53+
pub fn draw(&mut self, frame: &mut Frame, theme: &dyn Theme) {
5954
if !self.visible {
6055
return;
6156
}

src/ui/result_list.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::cmp;
22

33
use ratatui::{
4-
backend::CrosstermBackend,
54
layout::Rect,
65
style::Style,
76
text::{Line, Span},
@@ -303,12 +302,7 @@ impl ResultList {
303302
self.filtered_matches_count
304303
}
305304

306-
pub fn draw(
307-
&mut self,
308-
frame: &mut Frame<CrosstermBackend<std::io::Stdout>>,
309-
area: Rect,
310-
theme: &dyn Theme,
311-
) {
305+
pub fn draw(&mut self, frame: &mut Frame, area: Rect, theme: &dyn Theme) {
312306
let files_list: Vec<ListItem> = self
313307
.iter()
314308
.map(|e| match e {

src/ui/search_popup.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use ratatui::{
2-
backend::CrosstermBackend,
32
layout::{Alignment, Constraint, Direction, Layout, Rect},
43
text::{Line, Text},
54
widgets::{Block, Borders, Clear, Paragraph},
@@ -35,7 +34,7 @@ impl SearchPopup {
3534
self.pattern.pop();
3635
}
3736

38-
pub fn draw(&self, frame: &mut Frame<CrosstermBackend<std::io::Stdout>>, theme: &dyn Theme) {
37+
pub fn draw(&self, frame: &mut Frame, theme: &dyn Theme) {
3938
if !self.visible {
4039
return;
4140
}

src/ui/theme.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pub mod light;
33

44
use clap::ArgEnum;
55
use ratatui::style::{Color, Modifier, Style};
6-
use strum_macros::Display;
6+
use strum::Display;
77

88
#[derive(Display, Copy, Clone, Debug, ArgEnum)]
99
#[strum(serialize_all = "lowercase")]

0 commit comments

Comments
 (0)