aboutsummaryrefslogtreecommitdiff
path: root/src/proto.rs
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2019-05-17 19:48:45 +0300
committerHristo Venev <hristo@venev.name>2019-05-17 20:05:32 +0300
commitf726eca619e352e9563697c5db14dd98a97e95de (patch)
treef9fc9b11469651be3d38a1fa12be0b117dafafb3 /src/proto.rs
parentef687fa6a504992d639210a50f39d83c77341360 (diff)
rustfmt and style
Diffstat (limited to 'src/proto.rs')
-rw-r--r--src/proto.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/proto.rs b/src/proto.rs
index 9c98fff..d74a05f 100644
--- a/src/proto.rs
+++ b/src/proto.rs
@@ -58,8 +58,8 @@ pub struct Source {
}
impl Source {
- pub fn empty() -> Source {
- Source {
+ pub fn empty() -> Self {
+ Self {
config: SourceConfig {
servers: vec![],
road_warriors: vec![],
@@ -80,7 +80,7 @@ mod serde_utc {
if ser.is_human_readable() {
ser.serialize_str(&t.to_rfc3339_opts(SecondsFormat::Nanos, true))
} else {
- let mut buf = [0u8; 12];
+ let mut buf = [0_u8; 12];
let (buf_secs, buf_nanos) = mut_array_refs![&mut buf, 8, 4];
*buf_secs = t.timestamp().to_be_bytes();
*buf_nanos = t.timestamp_subsec_nanos().to_be_bytes();
@@ -94,7 +94,7 @@ mod serde_utc {
impl<'de> serde::de::Visitor<'de> for RFC3339Visitor {
type Value = SystemTime;
- fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("RFC3339 time")
}