dmesg: simplify expression.
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
parent
9e99aad01b
commit
5335f1bc2b
@ -118,10 +118,8 @@ impl DeltaFormatter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_datetime(s: &str) -> UResult<DateTime<FixedOffset>> {
|
pub fn parse_datetime(s: &str) -> UResult<DateTime<FixedOffset>> {
|
||||||
match parse_datetime::parse_datetime(s) {
|
parse_datetime::parse_datetime(s)
|
||||||
Ok(date_time) => Ok(date_time),
|
.map_err(|_| USimpleError::new(1, format!("invalid time value \"{s}\"")))
|
||||||
Err(_) => Err(USimpleError::new(1, format!("invalid time value \"{s}\""))),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn datetime_from_microseconds_since_boot(microseconds: i64) -> DateTime<FixedOffset> {
|
pub fn datetime_from_microseconds_since_boot(microseconds: i64) -> DateTime<FixedOffset> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user