mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
deps: cargo update (#474)
* deps: cargo update * deps: Update edition 2024 and run cargo update
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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() {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-5
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -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 utils::canonicalize_absolute_path;
|
||||
|
||||
@@ -40,7 +40,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;
|
||||
|
||||
|
||||
+6
-6
@@ -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)| {
|
||||
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user