Skip to content

Commit f3b5e0f

Browse files
Cargo Fix
1 parent 3415dce commit f3b5e0f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/run/functions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,23 +1634,23 @@ pub fn time_readable(
16341634
dev,
16351635
0,
16361636
);
1637-
if getstirng.len() > 0 {
1637+
if !getstirng.is_empty() {
16381638
let time: f64 = getstirng.first().unwrap().parse().unwrap();
16391639
println!("{}", time);
16401640
let d = UNIX_EPOCH + Duration::from_millis(time as u64);
16411641
// Create DateTime from SystemTime
16421642
let datetime = DateTime::<Utc>::from(d);
16431643
// Formats the combined date and time with the specified format string.
16441644
let timestamp_str = datetime.format("%Y-%m-%d %H:%M:%S.%f").to_string();
1645-
return timestamp_str;
1645+
timestamp_str
16461646
} else {
16471647
let time = time();
16481648
let d = UNIX_EPOCH + Duration::from_millis(time as u64);
16491649
// Create DateTime from SystemTime
16501650
let datetime = DateTime::<Utc>::from(d);
16511651
// Formats the combined date and time with the specified format string.
16521652
let timestamp_str = datetime.format("%Y-%m-%d %H:%M:%S.%f").to_string();
1653-
return timestamp_str;
1653+
timestamp_str
16541654
}
16551655
}
16561656

0 commit comments

Comments
 (0)