aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2019-09-28 16:14:16 +0000
committerHristo Venev <hristo@venev.name>2019-09-28 16:14:16 +0000
commitb20d7f8b89f5e4b065b0a3fee52ece8db6f99a74 (patch)
tree64ced378096257c871a97ec631cd2b7cff7b1920 /src
parent167a766f488091a9e6d833bb64e7e7cf8f90111f (diff)
Silence clippy warning.
Diffstat (limited to 'src')
-rw-r--r--src/model.rs3
-rw-r--r--src/proto.rs4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/model.rs b/src/model.rs
index bb4a93b..51386a5 100644
--- a/src/model.rs
+++ b/src/model.rs
@@ -2,6 +2,9 @@
//
// See COPYING.
+// FIXME: arrayref needs to silence this per-expression
+#![allow(clippy::eval_order_dependence)]
+
use base64;
use std::collections::HashMap;
use std::fmt;
diff --git a/src/proto.rs b/src/proto.rs
index d74a05f..07717b7 100644
--- a/src/proto.rs
+++ b/src/proto.rs
@@ -81,6 +81,8 @@ mod serde_utc {
ser.serialize_str(&t.to_rfc3339_opts(SecondsFormat::Nanos, true))
} else {
let mut buf = [0_u8; 12];
+ // FIXME: arrayref needs to silence this per-expression
+ #[allow(clippy::eval_order_dependence)]
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();
@@ -107,6 +109,8 @@ mod serde_utc {
de.deserialize_str(RFC3339Visitor)
} else {
let mut buf = <[u8; 12]>::deserialize(de)?;
+ // FIXME: arrayref needs to silence this per-expression
+ #[allow(clippy::eval_order_dependence)]
let (buf_secs, buf_nanos) = array_refs![&mut buf, 8, 4];
let secs = i64::from_be_bytes(*buf_secs);
let nanos = u32::from_be_bytes(*buf_nanos);