Skip to content

Commit 7d46967

Browse files
committed
bump rust edition to 2024 edition
1 parent 037aa2a commit 7d46967

File tree

13 files changed

+216
-229
lines changed

13 files changed

+216
-229
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "impala"
33
version = "0.3.0"
44
authors = ["Badr Badri <[email protected]>"]
55
license = "GPL-3.0"
6-
edition = "2021"
6+
edition = "2024"
77
description = "TUI for managing wifi"
88
readme = "Readme.md"
99
homepage = "https://github.com/pythops/impala"

src/access_point.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
use std::sync::{atomic::AtomicBool, Arc};
1+
use std::sync::{Arc, atomic::AtomicBool};
22

33
use iwdrs::session::Session;
44
use tokio::sync::mpsc::UnboundedSender;
55

66
use ratatui::{
7+
Frame,
78
layout::{Alignment, Constraint, Direction, Layout},
89
style::{Color, Style, Stylize},
910
text::Text,
1011
widgets::{Block, BorderType, Borders, Clear, Padding, Paragraph},
11-
Frame,
1212
};
1313

1414
use crate::{
@@ -217,13 +217,13 @@ impl AccessPoint {
217217
self.supported_ciphers = iwd_access_point.pairwise_ciphers().await?;
218218
self.used_cipher = iwd_access_point.group_cipher().await?;
219219

220-
if let Some(d) = iwd_access_point_diagnostic {
221-
if let Ok(diagnostic) = d.get().await {
222-
self.connected_devices = diagnostic
223-
.iter()
224-
.map(|v| v["Address"].clone().trim_matches('"').to_string())
225-
.collect();
226-
}
220+
if let Some(d) = iwd_access_point_diagnostic
221+
&& let Ok(diagnostic) = d.get().await
222+
{
223+
self.connected_devices = diagnostic
224+
.iter()
225+
.map(|v| v["Address"].clone().trim_matches('"').to_string())
226+
.collect();
227227
}
228228

229229
Ok(())

src/adapter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ use anyhow::Context;
44

55
use iwdrs::{adapter::Adapter as iwdAdapter, modes::Mode, session::Session};
66
use ratatui::{
7+
Frame,
78
layout::{Alignment, Constraint, Direction, Flex, Layout},
89
style::{Color, Style, Stylize},
910
text::Line,
1011
widgets::{Block, BorderType, Borders, Cell, Clear, List, Padding, Row, Table, TableState},
11-
Frame,
1212
};
1313
use tokio::sync::mpsc::UnboundedSender;
1414

src/app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use anyhow::anyhow;
22
use ratatui::{
3+
Frame,
34
layout::{Alignment, Constraint, Direction, Layout},
45
style::{Color, Style, Stylize},
56
text::Text,
67
widgets::{Block, BorderType, Borders, Clear, Padding, Paragraph},
7-
Frame,
88
};
99
use std::{
1010
error::Error,
1111
process::{self, exit},
12-
sync::{atomic::AtomicBool, Arc},
12+
sync::{Arc, atomic::AtomicBool},
1313
};
1414
use tokio::sync::mpsc::UnboundedSender;
1515
use tui_input::Input;

src/auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use ratatui::{
2+
Frame,
23
layout::{Alignment, Constraint, Direction, Layout},
34
style::{Color, Style, Stylize},
45
widgets::{Block, BorderType, Borders, Clear, Padding, Paragraph},
5-
Frame,
66
};
77

88
pub struct Auth;

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use clap::{arg, crate_version, Command};
1+
use clap::{Command, arg, crate_version};
22

33
pub fn cli() -> Command {
44
Command::new("impala")

src/help.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
use std::sync::Arc;
22

33
use ratatui::{
4+
Frame,
45
layout::{Alignment, Constraint, Direction, Layout, Margin},
56
style::{Color, Style, Stylize},
67
widgets::{
78
Block, BorderType, Borders, Cell, Clear, Padding, Row, Scrollbar, ScrollbarOrientation,
89
ScrollbarState, Table, TableState,
910
},
10-
Frame,
1111
};
1212

1313
use crate::{app::ColorMode, config::Config};

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use impala::help::Help;
66
use impala::tui::Tui;
77
use impala::{cli, rfkill};
88
use iwdrs::modes::Mode;
9-
use ratatui::backend::CrosstermBackend;
109
use ratatui::Terminal;
10+
use ratatui::backend::CrosstermBackend;
1111
use std::io;
1212
use std::sync::Arc;
1313

src/notification.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use ratatui::{
2+
Frame,
23
layout::{Alignment, Constraint, Direction, Layout, Rect},
34
style::{Color, Modifier, Style},
45
text::{Line, Text},
56
widgets::{Block, BorderType, Borders, Clear, Paragraph, Wrap},
6-
Frame,
77
};
88
use tokio::sync::mpsc::UnboundedSender;
99

@@ -32,7 +32,7 @@ impl Notification {
3232
};
3333

3434
let mut text = Text::from(vec![
35-
Line::from(title).style(Style::new().fg(color).add_modifier(Modifier::BOLD))
35+
Line::from(title).style(Style::new().fg(color).add_modifier(Modifier::BOLD)),
3636
]);
3737

3838
text.extend(Text::from(self.message.as_str()));

0 commit comments

Comments
 (0)