Skip to content

Commit e2a344b

Browse files
committed
refactor: reorganize imports and improve error message formatting
Reorganized imports in format_modifiers.rs to group related modules together for better code organization. Also improved error message formatting in test_date.rs by adding proper assertion formatting for macOS date setting error messages.
1 parent 62952c4 commit e2a344b

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/uu/date/src/format_modifiers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
//! - `%^B`: Month name in uppercase (JUNE)
3434
//! - `%+4C`: Century with sign, padded to 4 characters (+019)
3535
36-
use jiff::fmt::strtime::{BrokenDownTime, Config, PosixCustom};
3736
use jiff::Zoned;
37+
use jiff::fmt::strtime::{BrokenDownTime, Config, PosixCustom};
3838
use regex::Regex;
3939
use std::fmt;
4040
use std::sync::OnceLock;

tests/by-util/test_date.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,11 @@ fn test_date_set_mac_unavailable() {
481481
.arg("2020-03-11 21:45:00+08:00")
482482
.fails();
483483
result.no_stdout();
484-
assert!(result
485-
.stderr_str()
486-
.starts_with("date: setting the date is not supported by macOS"));
484+
assert!(
485+
result
486+
.stderr_str()
487+
.starts_with("date: setting the date is not supported by macOS")
488+
);
487489
}
488490

489491
#[test]

0 commit comments

Comments
 (0)