Skip to content

Commit

Permalink
Merge pull request #430 from imsnif/dependabot/cargo/dependencies-601…
Browse files Browse the repository at this point in the history
…1136989

chore(deps): bump the dependencies group across 1 directory with 21 updates
  • Loading branch information
cyqsimon authored Oct 8, 2024
2 parents cc11fcb + 5b651dd commit a40c392
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 179 deletions.
269 changes: 129 additions & 140 deletions Cargo.lock

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,54 +26,54 @@ default = []
ui_test = []

[dependencies]
anyhow = { version = "1.0.86", features = ["backtrace"] }
async-trait = "0.1.81"
anyhow = { version = "1.0.89", features = ["backtrace"] }
async-trait = "0.1.83"
chrono = "0.4"
clap-verbosity-flag = "2.2.1"
clap = { version = "4.5.13", features = ["derive"] }
crossterm = "0.27.0"
clap-verbosity-flag = "2.2.2"
clap = { version = "4.5.19", features = ["derive"] }
crossterm = "0.28.1"
derivative = "2.2.0"
ipnetwork = "0.20.0"
itertools = "0.13.0"
log = "0.4.22"
once_cell = "1.19.0"
once_cell = "1.20.2"
pnet = "0.34.0"
pnet_macros_support = "0.34.0"
ratatui = "0.27.0"
ratatui = "0.28.1"
resolv-conf = "0.7.0"
simplelog = "0.12.2"
thiserror = "1.0.63"
tokio = { version = "1.39", features = ["rt", "sync"] }
thiserror = "1.0.64"
tokio = { version = "1.40", features = ["rt", "sync"] }
trust-dns-resolver = "0.23.2"
unicode-width = "0.1.11"
unicode-width = "0.2.0"
strum = { version = "0.26.3", features = ["derive"] }

[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
procfs = "0.16.0"
procfs = "0.17.0"

[target.'cfg(any(target_os = "macos", target_os = "freebsd"))'.dependencies]
regex = "1.10.5"
regex = "1.11.0"

[target.'cfg(target_os = "windows")'.dependencies]
netstat2 = "0.9.1"
sysinfo = "0.31.0"
sysinfo = "0.32.0"

[dev-dependencies]
insta = "1.39.0"
insta = "1.40.0"
packet-builder = { version = "0.7.0", git = "https://github.com/cyqsimon/packet_builder.git", branch = "patch-update" }
pnet_base = "0.34.0"
regex = "1.10.5"
rstest = "0.21.0"
regex = "1.11.0"
rstest = "0.23.0"

[build-dependencies]
anyhow = "1.0.86"
clap = { version = "4.5.13", features = ["derive"] }
clap-verbosity-flag = "2.2.1"
clap_complete = "4.5.12"
anyhow = "1.0.89"
clap = { version = "4.5.19", features = ["derive"] }
clap-verbosity-flag = "2.2.2"
clap_complete = "4.5.32"
clap_mangen = "0.2.23"
derivative = "2.2.0"
strum = { version = "0.26.3", features = ["derive"] }

[target.'cfg(target_os = "windows")'.build-dependencies]
http_req = "0.11.1"
zip = "2.1.6"
http_req = "0.12.0"
zip = "2.2.0"
2 changes: 1 addition & 1 deletion src/display/components/header_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::time::{Duration, Instant};
use ratatui::{
layout::{Alignment, Rect},
style::{Color, Modifier, Style},
terminal::Frame,
text::Span,
widgets::Paragraph,
Frame,
};
use unicode_width::UnicodeWidthStr;

Expand Down
2 changes: 1 addition & 1 deletion src/display/components/help_text.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use ratatui::{
layout::{Alignment, Rect},
style::{Modifier, Style},
terminal::Frame,
text::Span,
widgets::Paragraph,
Frame,
};

pub struct HelpText {
Expand Down
2 changes: 1 addition & 1 deletion src/display/components/layout.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ratatui::{
layout::{Constraint, Direction, Rect},
terminal::Frame,
Frame,
};

use crate::display::{HeaderDetails, HelpText, Table};
Expand Down
2 changes: 1 addition & 1 deletion src/display/components/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use itertools::Itertools;
use ratatui::{
layout::{Constraint, Rect},
style::{Color, Style},
terminal::Frame,
widgets::{Block, Borders, Row},
Frame,
};
use unicode_width::{UnicodeWidthChar, UnicodeWidthStr};

Expand Down
12 changes: 6 additions & 6 deletions src/display/raw_terminal_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::io;
use ratatui::{
backend::{Backend, WindowSize},
buffer::Cell,
layout::{Rect, Size},
layout::{Position, Size},
};

pub struct RawTerminalBackend {}
Expand All @@ -31,11 +31,11 @@ impl Backend for RawTerminalBackend {
Ok(())
}

fn get_cursor(&mut self) -> io::Result<(u16, u16)> {
Ok((0, 0))
fn get_cursor_position(&mut self) -> io::Result<Position> {
Ok(Position::new(0, 0))
}

fn set_cursor(&mut self, _x: u16, _y: u16) -> io::Result<()> {
fn set_cursor_position<P: Into<Position>>(&mut self, _position: P) -> io::Result<()> {
Ok(())
}

Expand All @@ -46,8 +46,8 @@ impl Backend for RawTerminalBackend {
Ok(())
}

fn size(&self) -> io::Result<Rect> {
Ok(Rect::new(0, 0, 0, 0))
fn size(&self) -> io::Result<Size> {
Ok(Size::new(0, 0))
}

fn window_size(&mut self) -> io::Result<WindowSize> {
Expand Down
2 changes: 1 addition & 1 deletion src/display/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ where
footer: HelpText { paused, show_dns },
};
self.terminal
.draw(|frame| layout.render(frame, frame.size(), ui_offset))
.draw(|frame| layout.render(frame, frame.area(), ui_offset))
.unwrap();
}

Expand Down
12 changes: 6 additions & 6 deletions src/tests/fakes/fake_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
use ratatui::{
backend::{Backend, WindowSize},
buffer::Cell,
layout::{Rect, Size},
layout::{Position, Size},
};

#[derive(Hash, Debug, PartialEq)]
Expand Down Expand Up @@ -65,12 +65,12 @@ impl Backend for TestBackend {
Ok(())
}

fn get_cursor(&mut self) -> io::Result<(u16, u16)> {
fn get_cursor_position(&mut self) -> io::Result<Position> {
self.events.lock().unwrap().push(TerminalEvent::GetCursor);
Ok((0, 0))
Ok(Position::new(0, 0))
}

fn set_cursor(&mut self, _x: u16, _y: u16) -> io::Result<()> {
fn set_cursor_position<P: Into<Position>>(&mut self, _position: P) -> io::Result<()> {
Ok(())
}

Expand Down Expand Up @@ -106,11 +106,11 @@ impl Backend for TestBackend {
Ok(())
}

fn size(&self) -> io::Result<Rect> {
fn size(&self) -> io::Result<Size> {
let terminal_height = self.terminal_height.lock().unwrap();
let terminal_width = self.terminal_width.lock().unwrap();

Ok(Rect::new(0, 0, *terminal_width, *terminal_height))
Ok(Size::new(*terminal_width, *terminal_height))
}

fn window_size(&mut self) -> io::Result<WindowSize> {
Expand Down

0 comments on commit a40c392

Please sign in to comment.