Skip to content

Commit 4bb7ebd

Browse files
authored
Merge pull request #298 from Byron/updates
remove rust-version in favor of just the edition
2 parents 6e91054 + 1a38653 commit 4bb7ebd

File tree

19 files changed

+97
-109
lines changed

19 files changed

+97
-109
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "dua-cli"
33
version = "2.32.2"
44
authors = ["Sebastian Thiel <[email protected]>"]
5-
edition = "2021"
5+
edition = "2024"
66
repository = "https://github.com/Byron/dua-cli"
77
readme = "README.md"
88
description = "A tool to conveniently learn about the disk usage of directories, fast!"
@@ -15,7 +15,6 @@ include = [
1515
"CHANGELOG.md",
1616
"!**/tests/*",
1717
]
18-
rust-version = "1.83.0"
1918

2019
[features]
2120
default = ["tui-crossplatform", "trash-move"]
@@ -35,8 +34,8 @@ clap_complete = "4.5.54"
3534
jwalk = "0.8.1"
3635
byte-unit = "4"
3736
atty = "0.2.11"
38-
petgraph = "0.7"
39-
itertools = "0.13.0"
37+
petgraph = "0.8.3"
38+
itertools = "0.14.0"
4039
num_cpus = "1.10.0"
4140
filesize = "0.2.0"
4241
anyhow = "1.0.31"
@@ -56,7 +55,7 @@ wild = "2.0.4"
5655
owo-colors = "4.0.0"
5756
human_format = "1.0.3"
5857
once_cell = "1.19"
59-
gix-glob = "0.17.0"
58+
gix-glob = "0.22.1"
6059
gix-path = "0.10.10"
6160
bstr = "1.8.0"
6261
simplelog = "0.12.1"

src/aggregate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{crossdev, ByteFormat, InodeFilter, Throttle, WalkOptions, WalkResult};
1+
use crate::{ByteFormat, InodeFilter, Throttle, WalkOptions, WalkResult, crossdev};
22
use anyhow::Result;
33
use filesize::PathExt;
44
use owo_colors::{AnsiColors as Color, OwoColorize};

src/common.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use crate::crossdev;
22
use crate::traverse::{EntryData, Tree, TreeIndex};
3-
use byte_unit::{n_gb_bytes, n_gib_bytes, n_mb_bytes, n_mib_bytes, ByteUnit};
3+
use byte_unit::{ByteUnit, n_gb_bytes, n_gib_bytes, n_mb_bytes, n_mib_bytes};
44
use std::collections::BTreeSet;
55
use std::path::PathBuf;
6-
use std::sync::atomic::{AtomicBool, Ordering};
76
use std::sync::Arc;
7+
use std::sync::atomic::{AtomicBool, Ordering};
88
use std::time::Duration;
99
use std::{fmt, path::Path};
1010

@@ -74,8 +74,8 @@ pub struct ByteFormatDisplay {
7474

7575
impl fmt::Display for ByteFormatDisplay {
7676
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
77-
use byte_unit::Byte;
7877
use ByteFormat::*;
78+
use byte_unit::Byte;
7979

8080
let format = match self.format {
8181
Bytes => return write!(f, "{} b", self.bytes),

src/interactive/app/eventloop.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
use crate::interactive::state::FilesystemScan;
22
use crate::interactive::{
3+
CursorDirection, CursorMode, DisplayOptions, EntryCheck, MarkEntryMode,
34
app::navigation::Navigation,
45
state::FocussedPane,
5-
widgets::{glob_search, MainWindow, MainWindowProps},
6-
CursorDirection, CursorMode, DisplayOptions, EntryCheck, MarkEntryMode,
6+
widgets::{MainWindow, MainWindowProps, glob_search},
77
};
88
use anyhow::Result;
99
use crossbeam::channel::Receiver;
1010
use crosstermion::crossterm::event::{KeyCode, KeyEvent, KeyEventKind, KeyModifiers};
1111
use crosstermion::input::Event;
1212
use dua::{
13-
traverse::{BackgroundTraversal, EntryData, Traversal, TreeIndex},
1413
WalkResult,
14+
traverse::{BackgroundTraversal, EntryData, Traversal, TreeIndex},
1515
};
1616
use std::path::PathBuf;
17-
use tui::{backend::Backend, buffer::Buffer, layout::Rect, widgets::Widget, Terminal};
17+
use tui::{Terminal, backend::Backend, buffer::Buffer, layout::Rect, widgets::Widget};
1818

1919
use super::state::{AppState, Cursor};
2020
use super::tree_view::TreeView;
@@ -232,8 +232,8 @@ impl AppState {
232232
where
233233
B: Backend,
234234
{
235-
use crosstermion::crossterm::event::KeyCode::*;
236235
use FocussedPane::*;
236+
use crosstermion::crossterm::event::KeyCode::*;
237237

238238
let key = match event {
239239
Event::Key(key) if key.kind != KeyEventKind::Release => {
@@ -275,7 +275,7 @@ impl AppState {
275275
Char('c') if key.modifiers.contains(KeyModifiers::CONTROL) && !glob_focussed => {
276276
return Ok(Some(WalkResult {
277277
num_errors: self.stats.io_errors,
278-
}))
278+
}));
279279
}
280280
_ => {
281281
handled = false;
@@ -386,10 +386,10 @@ impl AppState {
386386
});
387387

388388
// If we are displaying the root of the glob search results then cancel the search.
389-
if let Some(glob_tree_root) = tree.glob_tree_root {
390-
if glob_tree_root == self.navigation().view_root {
391-
self.quit_glob_mode(tree, window)
392-
}
389+
if let Some(glob_tree_root) = tree.glob_tree_root
390+
&& glob_tree_root == self.navigation().view_root
391+
{
392+
self.quit_glob_mode(tree, window)
393393
}
394394

395395
let (paths, remove_root_node, skip_root, use_root_path, index, parent_index) = match what {

src/interactive/app/handlers.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use crate::interactive::{
2+
DisplayOptions, EntryDataBundle,
23
app::tree_view::TreeView,
34
widgets::{Column, GlobPane, HelpPane, MainWindow, MarkMode, MarkPane},
4-
DisplayOptions, EntryDataBundle,
55
};
66
use crosstermion::input::Key;
77
use dua::traverse::TreeIndex;
88
use std::{fs, io, path::PathBuf};
9-
use tui::{backend::Backend, Terminal};
9+
use tui::{Terminal, backend::Backend};
1010

1111
use super::state::{AppState, FocussedPane::*};
1212

@@ -212,7 +212,7 @@ impl AppState {
212212
&mut window.glob_pane,
213213
) {
214214
(Main, Some(_), _, _) => Help,
215-
(Help, _, Some(ref mut pane), _) => {
215+
(Help, _, Some(pane), _) => {
216216
pane.set_focus(true);
217217
Mark
218218
}
@@ -221,7 +221,7 @@ impl AppState {
221221
(Mark, _, _, Some(_)) => Glob,
222222
(Mark, _, _, _) => Main,
223223
(Main, None, None, None) => Main,
224-
(Main, None, Some(ref mut pane), _) => {
224+
(Main, None, Some(pane), _) => {
225225
pane.set_focus(true);
226226
Mark
227227
}

src/interactive/app/state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use std::collections::HashSet;
22
use std::path::PathBuf;
33

4-
use dua::traverse::{BackgroundTraversal, TraversalStats};
54
use dua::WalkOptions;
5+
use dua::traverse::{BackgroundTraversal, TraversalStats};
66

77
use crate::interactive::widgets::Column;
88

9-
use super::{navigation::Navigation, EntryDataBundle, SortMode};
9+
use super::{EntryDataBundle, SortMode, navigation::Navigation};
1010

1111
#[derive(Default, Copy, Clone, PartialEq)]
1212
pub enum FocussedPane {

src/interactive/app/terminal.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ use crossbeam::channel::Receiver;
66
use crosstermion::input::Event;
77
#[cfg(test)]
88
use dua::traverse::TraversalStats;
9-
use dua::{traverse::Traversal, ByteFormat, WalkOptions, WalkResult};
10-
use tui::{backend::Backend, Terminal};
9+
use dua::{ByteFormat, WalkOptions, WalkResult, traverse::Traversal};
10+
use tui::{Terminal, backend::Backend};
1111

1212
use crate::interactive::widgets::MainWindow;
1313

14-
use super::{sorted_entries, state::AppState, DisplayOptions};
14+
use super::{DisplayOptions, sorted_entries, state::AppState};
1515

1616
/// State and methods representing the interactive disk usage analyser for the terminal
1717
pub struct TerminalApp {

src/interactive/app/tests/journeys_readonly.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ use std::ffi::OsString;
77
use crate::interactive::app::tests::utils::{into_codes, into_events};
88
use crate::interactive::widgets::Column;
99
use crate::interactive::{
10+
SortMode,
1011
app::tests::{
12+
FIXTURE_PATH,
1113
utils::{
1214
fixture_str, index_by_name, initialized_app_and_terminal_from_fixture, into_keys,
1315
node_by_index, node_by_name,
1416
},
15-
FIXTURE_PATH,
1617
},
17-
SortMode,
1818
};
1919

2020
#[test]

src/interactive/app/tests/journeys_with_writes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::interactive::app::tests::utils::{
2-
initialized_app_and_terminal_from_paths, into_codes, WritableFixture,
2+
WritableFixture, initialized_app_and_terminal_from_paths, into_codes,
33
};
44
use anyhow::Result;
55
use crosstermion::crossterm::event::{KeyCode, KeyEvent, KeyModifiers};

0 commit comments

Comments
 (0)