Add reproducible unprivileged Linux build and mount checks
This commit is contained in:
+5
-5
@@ -131,7 +131,7 @@ impl FromStr for SortColumn {
|
||||
"size" | "s" | "disk" | "d" => Ok(SortColumn::Disk),
|
||||
"apparent" | "a" => Ok(SortColumn::Apparent),
|
||||
"blocks" | "b" => Ok(SortColumn::Blocks),
|
||||
_ => Err(format!("Unknown column: {}", s)),
|
||||
_ => Err(format!("Unknown column: {s}")),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ impl FromStr for SortDirection {
|
||||
match s.to_lowercase().as_str() {
|
||||
"asc" | "a" => Ok(SortDirection::Asc),
|
||||
"dsc" | "d" | "desc" => Ok(SortDirection::Dsc),
|
||||
_ => Err(format!("Unknown direction: {}", s)),
|
||||
_ => Err(format!("Unknown direction: {s}")),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,7 +182,7 @@ pub fn run(args: Args, mut writer: &mut dyn Write) -> bool {
|
||||
match Byte::parse_str(size_str, true) {
|
||||
Ok(byte) => byte.as_u64(),
|
||||
Err(e) => {
|
||||
eprintln!("Error parsing size '{}': {}", size_str, e);
|
||||
eprintln!("Error parsing size '{size_str}': {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
@@ -478,7 +478,7 @@ fn print_text(
|
||||
}
|
||||
}
|
||||
|
||||
writeln!(writer, "{}", summary).ok();
|
||||
writeln!(writer, "{summary}").ok();
|
||||
} else {
|
||||
writeln!(writer, "Total size: {}", "Access Denied".bold().red()).ok();
|
||||
}
|
||||
@@ -649,7 +649,7 @@ fn print_text(
|
||||
table.add_row(row);
|
||||
}
|
||||
}
|
||||
writeln!(writer, "{}", table).ok();
|
||||
writeln!(writer, "{table}").ok();
|
||||
}
|
||||
|
||||
fn print_csv(writer: &mut dyn Write, children: &[&Node], args: &Args) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ fn main() {
|
||||
OutputFormat::Json => "json",
|
||||
_ => "txt",
|
||||
};
|
||||
PathBuf::from(format!("{}_{}.{}", timestamp, dir_name, ext))
|
||||
PathBuf::from(format!("{timestamp}_{dir_name}.{ext}"))
|
||||
} else {
|
||||
path_arg.clone()
|
||||
};
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ pub enum EntryType {
|
||||
|
||||
impl std::fmt::Display for EntryType {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{:?}", self)
|
||||
write!(f, "{self:?}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user