mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
rustfmt the recent changes
This commit is contained in:
parent
9c2cd81b11
commit
6734ce785d
3 changed files with 6 additions and 7 deletions
|
@ -26,9 +26,9 @@ use time::Timespec;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use winapi::shared::minwindef::{DWORD, LPVOID};
|
use winapi::shared::minwindef::{DWORD, LPVOID};
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use winapi::um::fileapi::{FILE_STANDARD_INFO, FILE_ID_INFO};
|
use winapi::um::fileapi::{FILE_ID_INFO, FILE_STANDARD_INFO};
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use winapi::um::minwinbase::{FileStandardInfo, FileIdInfo};
|
use winapi::um::minwinbase::{FileIdInfo, FileStandardInfo};
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use winapi::um::winbase::GetFileInformationByHandleEx;
|
use winapi::um::winbase::GetFileInformationByHandleEx;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
|
|
|
@ -36,7 +36,6 @@ const AFTER_HELP: &str = r#"
|
||||||
\\xHH byte with hexadecimal value HH (1 to 2 digits)
|
\\xHH byte with hexadecimal value HH (1 to 2 digits)
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
|
|
||||||
mod options {
|
mod options {
|
||||||
pub const STRING: &str = "STRING";
|
pub const STRING: &str = "STRING";
|
||||||
pub const NO_NEWLINE: &str = "no_newline";
|
pub const NO_NEWLINE: &str = "no_newline";
|
||||||
|
|
|
@ -493,13 +493,13 @@ fn get_leading_number(a: &str) -> &str {
|
||||||
fn num_sort_dedup(a: &str) -> &str {
|
fn num_sort_dedup(a: &str) -> &str {
|
||||||
// Empty lines are dumped
|
// Empty lines are dumped
|
||||||
if a.is_empty() {
|
if a.is_empty() {
|
||||||
return "0"
|
return "0";
|
||||||
// And lines that don't begin numerically are dumped
|
// And lines that don't begin numerically are dumped
|
||||||
} else if !a.trim().chars().nth(0).unwrap_or('\0').is_numeric() {
|
} else if !a.trim().chars().nth(0).unwrap_or('\0').is_numeric() {
|
||||||
return "0"
|
return "0";
|
||||||
} else {
|
} else {
|
||||||
// Prepare lines for comparison of only the numerical leading numbers
|
// Prepare lines for comparison of only the numerical leading numbers
|
||||||
return get_leading_number(a)
|
return get_leading_number(a);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue