Skip to content

Commit 4b29d1e

Browse files
committed
Upgraded dependencies
1 parent 110ace8 commit 4b29d1e

File tree

7 files changed

+93
-52
lines changed

7 files changed

+93
-52
lines changed

Cargo.lock

Lines changed: 79 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ repository = "https://github.com/fritzrehde/watchbind"
1010
description = "A CLI menu for periodically watching a program's output and executing commands on its lines through keybindings"
1111

1212
[dependencies]
13-
clap = { version = "4.4.7", default-features = false, features = ["std", "help", "cargo", "derive", "error-context", "string", "color"] }
13+
clap = { version = "4.4.8", default-features = false, features = ["std", "help", "cargo", "derive", "error-context", "string", "color"] }
1414
serde = { version = "1.0", default-features = false, features = ["derive"] }
15-
toml = { version = "0.7.8", default-features = false, features = ["parse"] }
16-
ratatui = "0.22.0"
15+
toml = { version = "0.8.8", default-features = false, features = ["parse"] }
16+
ratatui = "0.24.0"
1717
crossterm = { version = "0.27", features = ["events", "event-stream"] }
1818
itertools = "0.11.0"
1919
anyhow = "1.0.75"
2020
indoc = "2.0.4"
2121
derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "into_iterator", "as_ref"] }
2222
tabwriter = "1.3.0"
2323
parse-display = "0.8.2"
24-
derive-new = "0.5.9"
24+
derive-new = "0.6.0"
2525
simplelog = "0.12.1"
2626
log = "0.4.20"
2727
ranges = "0.3.3"
2828
# TODO: maybe we don't need all tokio and futures features, try to reduce
29-
tokio = { version = "1.33.0", features = ["full"] }
29+
tokio = { version = "1.34.0", features = ["full"] }
3030
futures = "0.3.29"
3131
ansi-to-tui = "3.1.0"
3232
once_cell = "1.18.0"

src/config/keybindings/key.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,7 @@ where
194194
T::iter()
195195
// TODO: replace with strum's get_bool once available
196196
// Hide variants configured to be hidden.
197-
.filter(|variant| match variant.get_str("Hidden") {
198-
Some("true") => false,
199-
_ => true,
200-
})
197+
.filter(|variant| !matches!(variant.get_str("Hidden"), Some("true")))
201198
// Use strum's `message` if available, otherwise use `to_string`.
202199
.map(|variant| {
203200
variant

src/ui/state/help_menu.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::EnvVariables;
22
use ratatui::{
3-
prelude::{Alignment, Backend, Constraint, Direction, Layout, Margin, Rect},
3+
prelude::{Alignment, Constraint, Direction, Layout, Margin, Rect},
44
text::Text,
55
widgets::{Block, Borders, Paragraph, Scrollbar, ScrollbarOrientation, ScrollbarState, Wrap},
66
Frame,
@@ -32,7 +32,7 @@ impl HelpMenu {
3232
}
3333
}
3434

35-
pub fn render<B: Backend>(&mut self, frame: &mut Frame<B>) {
35+
pub fn render(&mut self, frame: &mut Frame) {
3636
// TODO: maybe in the future, when we add more features for manipulating ENV variable state, we have to fetch the new
3737
let area = centered_rect(50, 50, frame.size());
3838

@@ -70,7 +70,7 @@ impl HelpMenu {
7070

7171
fn update_vertical_scroll_index(&mut self, index: usize) {
7272
self.vertical_scroll_index = index;
73-
self.vertical_scroll_state = self.vertical_scroll_state.position(index as u16);
73+
self.vertical_scroll_state = self.vertical_scroll_state.position(index);
7474
}
7575

7676
// Moving

src/ui/state/lines/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use anyhow::Result;
88
use derive_more::{From, Into};
99
use itertools::{izip, Itertools};
1010
use ratatui::{
11-
prelude::{Backend, Constraint},
11+
prelude::Constraint,
1212
style::Style,
1313
widgets::{Row, Table, TableState},
1414
Frame,
@@ -56,7 +56,7 @@ impl Lines {
5656
}
5757

5858
/// Render to frame.
59-
pub fn render<B: Backend>(&mut self, frame: &mut Frame<B>) {
59+
pub fn render(&mut self, frame: &mut Frame) {
6060
// TODO: do as much as possible in update_lines to improve performance
6161
let rows: Vec<Row> = izip!(self.lines.iter(), self.line_selections.iter())
6262
.map(|(line, selected)| Row::new(vec![selected.draw(), line.draw()]))

src/ui/state/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use self::{
99
use crate::config::{Fields, Operation, Operations, OperationsParsed, Styles};
1010
use anyhow::{bail, Result};
1111
use once_cell::sync::Lazy;
12-
use ratatui::{backend::Backend, Frame};
12+
use ratatui::{Frame};
1313
use std::sync::Arc;
1414
use tokio::sync::Mutex;
1515

@@ -46,7 +46,7 @@ impl State {
4646
}
4747
}
4848

49-
pub fn draw<B: Backend>(&mut self, frame: &mut Frame<B>) {
49+
pub fn draw(&mut self, frame: &mut Frame) {
5050
self.lines.render(frame);
5151
if let Mode::HelpMenu = self.mode {
5252
self.help_menu.render(frame);

src/ui/terminal_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl Tui {
3333
/// Draw provided frame to TUI.
3434
pub fn draw<F>(&mut self, f: F) -> Result<()>
3535
where
36-
F: FnOnce(&mut Frame<Backend>),
36+
F: FnOnce(&mut Frame),
3737
{
3838
self.terminal.draw(f)?;
3939
Ok(())

0 commit comments

Comments
 (0)