mirror of
https://gitee.com/openharmony/third_party_rust_humantime
synced 2024-11-23 07:30:19 +00:00
Apply suggestions
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
parent
2ec4fba235
commit
f00dbbae37
@ -350,7 +350,7 @@ impl fmt::Display for Rfc3339Timestamp {
|
||||
buf[25] = b'0' + (nanos / 1_000 % 10) as u8;
|
||||
buf[26] = b'0' + (nanos / 100 % 10) as u8;
|
||||
buf[27] = b'0' + (nanos / 10 % 10) as u8;
|
||||
buf[28] = b'0' + (nanos % 10) as u8;
|
||||
buf[28] = b'0' + (nanos / 1 % 10) as u8;
|
||||
// 29th is 'Z'
|
||||
29
|
||||
};
|
||||
|
@ -285,7 +285,7 @@ impl fmt::Display for FormattedDuration {
|
||||
let micros = nanos / 1000 % 1000;
|
||||
let nanosec = nanos % 1000;
|
||||
|
||||
let started = &mut false;
|
||||
let ref mut started = false;
|
||||
item_plural(f, started, "year", years)?;
|
||||
item_plural(f, started, "month", months)?;
|
||||
item_plural(f, started, "day", days)?;
|
||||
|
12
src/lib.rs
12
src/lib.rs
@ -22,12 +22,12 @@ mod duration;
|
||||
mod wrapper;
|
||||
mod date;
|
||||
|
||||
pub use self::duration::{parse_duration, Error as DurationError};
|
||||
pub use self::duration::{format_duration, FormattedDuration};
|
||||
pub use self::wrapper::{Duration, Timestamp};
|
||||
pub use self::date::{parse_rfc3339, parse_rfc3339_weak, Error as TimestampError};
|
||||
pub use self::date::{
|
||||
pub use duration::{parse_duration, Error as DurationError};
|
||||
pub use duration::{format_duration, FormattedDuration};
|
||||
pub use wrapper::{Duration, Timestamp};
|
||||
pub use date::{parse_rfc3339, parse_rfc3339_weak, Error as TimestampError};
|
||||
pub use date::{
|
||||
format_rfc3339, format_rfc3339_micros, format_rfc3339_millis, format_rfc3339_nanos,
|
||||
format_rfc3339_seconds,
|
||||
};
|
||||
pub use self::date::{Rfc3339Timestamp};
|
||||
pub use date::{Rfc3339Timestamp};
|
||||
|
Loading…
Reference in New Issue
Block a user