Skip to content

Commit

Permalink
deps: Update edition 2024
Browse files Browse the repository at this point in the history
and run cargo update
  • Loading branch information
bootandy committed Mar 9, 2025
1 parent 543b090 commit 2d26a99
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 57 deletions.
76 changes: 38 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "du-dust"
description = "A more intuitive version of du"
version = "1.1.2"
authors = ["bootandy <[email protected]>", "nebkor <[email protected]>"]
edition = "2021"
edition = "2024"
readme = "README.md"

documentation = "https://github.com/bootandy/dust"
Expand Down
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use clap::{builder::PossibleValue, value_parser, Arg, Command};
use clap::{Arg, Command, builder::PossibleValue, value_parser};

// For single thread mode set this variable on your command line:
// export RAYON_NUM_THREADS=1
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ mod tests {
use super::*;
use chrono::{Datelike, Timelike};
use clap::builder::PossibleValue;
use clap::{value_parser, Arg, ArgMatches, Command};
use clap::{Arg, ArgMatches, Command, value_parser};

#[test]
fn test_get_current_date_epoch_seconds() {
Expand Down
2 changes: 1 addition & 1 deletion src/dir_walker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use std::sync::Arc;
use std::sync::Mutex;

use crate::node::Node;
use crate::progress::ORDERING;
use crate::progress::Operation;
use crate::progress::PAtomicInfo;
use crate::progress::RuntimeErrors;
use crate::progress::ORDERING;
use crate::utils::is_filtered_out_due_to_file_time;
use crate::utils::is_filtered_out_due_to_invert_regex;
use crate::utils::is_filtered_out_due_to_regex;
Expand Down
6 changes: 1 addition & 5 deletions src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ impl DisplayData {

fn percent_size(&self, node: &DisplayNode) -> f32 {
let result = node.size as f32 / self.base_size as f32;
if result.is_normal() {
result
} else {
0.0
}
if result.is_normal() { result } else { 0.0 }
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ use std::fs::read_to_string;
use std::io;
use std::panic;
use std::process;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use std::sync::Mutex;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering;
use sysinfo::{System, SystemExt};

use self::display::draw_it;
Expand All @@ -39,7 +39,7 @@ use filter_type::get_all_file_types;
use regex::Regex;
use std::cmp::max;
use std::path::PathBuf;
use terminal_size::{terminal_size, Height, Width};
use terminal_size::{Height, Width, terminal_size};
use utils::get_filesystem_devices;
use utils::simplify_dir_names;

Expand Down
12 changes: 6 additions & 6 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ pub fn build_node(
|| is_filtered_out_due_to_invert_regex(walk_data.invert_filter_regex, &dir)
|| by_filecount && !is_file
|| [
(&walk_data.filter_modified_time, data.2 .0),
(&walk_data.filter_accessed_time, data.2 .1),
(&walk_data.filter_changed_time, data.2 .2),
(&walk_data.filter_modified_time, data.2.0),
(&walk_data.filter_accessed_time, data.2.1),
(&walk_data.filter_changed_time, data.2.2),
]
.iter()
.any(|(filter_time, actual_time)| {
Expand All @@ -61,9 +61,9 @@ pub fn build_node(
1
} else if by_filetime.is_some() {
match by_filetime {
Some(FileTime::Modified) => data.2 .0.unsigned_abs(),
Some(FileTime::Accessed) => data.2 .1.unsigned_abs(),
Some(FileTime::Changed) => data.2 .2.unsigned_abs(),
Some(FileTime::Modified) => data.2.0.unsigned_abs(),
Some(FileTime::Accessed) => data.2.1.unsigned_abs(),
Some(FileTime::Changed) => data.2.2.unsigned_abs(),
None => unreachable!(),
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::{
io::Write,
path::Path,
sync::{
Arc, RwLock,
atomic::{AtomicU8, AtomicUsize, Ordering},
mpsc::{self, RecvTimeoutError, Sender},
Arc, RwLock,
},
thread::JoinHandle,
time::Duration,
Expand Down

0 comments on commit 2d26a99

Please sign in to comment.