mirror of
https://gitee.com/openharmony/third_party_rust_serde
synced 2024-11-27 09:01:43 +00:00
Format PR 1702 with rustfmt
This commit is contained in:
parent
a81968af3c
commit
3c97e1b9a9
@ -616,7 +616,7 @@ impl Serialize for SystemTime {
|
||||
use super::SerializeStruct;
|
||||
let duration_since_epoch = self
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.map_err(|_|S::Error::custom("SystemTime must be later than UNIX_EPOCH"))?;
|
||||
.map_err(|_| S::Error::custom("SystemTime must be later than UNIX_EPOCH"))?;
|
||||
let mut state = try!(serializer.serialize_struct("SystemTime", 2));
|
||||
try!(state.serialize_field("secs_since_epoch", &duration_since_epoch.as_secs()));
|
||||
try!(state.serialize_field("nanos_since_epoch", &duration_since_epoch.subsec_nanos()));
|
||||
|
Loading…
Reference in New Issue
Block a user