1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

rustfmt the recent changes

This commit is contained in:
Sylvestre Ledru 2021-04-01 23:25:37 +02:00
parent 9c2cd81b11
commit 6734ce785d
3 changed files with 6 additions and 7 deletions

View file

@ -26,9 +26,9 @@ use time::Timespec;
#[cfg(windows)]
use winapi::shared::minwindef::{DWORD, LPVOID};
#[cfg(windows)]
use winapi::um::fileapi::{FILE_STANDARD_INFO, FILE_ID_INFO};
use winapi::um::fileapi::{FILE_ID_INFO, FILE_STANDARD_INFO};
#[cfg(windows)]
use winapi::um::minwinbase::{FileStandardInfo, FileIdInfo};
use winapi::um::minwinbase::{FileIdInfo, FileStandardInfo};
#[cfg(windows)]
use winapi::um::winbase::GetFileInformationByHandleEx;
#[cfg(windows)]

View file

@ -36,7 +36,6 @@ const AFTER_HELP: &str = r#"
\\xHH byte with hexadecimal value HH (1 to 2 digits)
"#;
mod options {
pub const STRING: &str = "STRING";
pub const NO_NEWLINE: &str = "no_newline";

View file

@ -493,13 +493,13 @@ fn get_leading_number(a: &str) -> &str {
fn num_sort_dedup(a: &str) -> &str {
// Empty lines are dumped
if a.is_empty() {
return "0"
return "0";
// And lines that don't begin numerically are dumped
} else if !a.trim().chars().nth(0).unwrap_or('\0').is_numeric() {
return "0"
return "0";
} else {
// Prepare lines for comparison of only the numerical leading numbers
return get_leading_number(a)
// Prepare lines for comparison of only the numerical leading numbers
return get_leading_number(a);
};
}