Fix Clippy lints: needless_pass_by_value

This commit is contained in:
Brandon W Maister 2017-06-23 14:58:07 -05:00
parent c63a012253
commit de7f0f64f7
1 changed files with 3 additions and 3 deletions

View File

@ -766,19 +766,19 @@ pub mod serde {
fn visit_i64<E>(self, value: i64) -> Result<DateTime<FixedOffset>, E>
where E: de::Error
{
from(FixedOffset::east(0).timestamp_opt(value, 0), value)
from(FixedOffset::east(0).timestamp_opt(value, 0), &value)
}
/// Deserialize a timestamp in seconds since the epoch
fn visit_u64<E>(self, value: u64) -> Result<DateTime<FixedOffset>, E>
where E: de::Error
{
from(FixedOffset::east(0).timestamp_opt(value as i64, 0), value)
from(FixedOffset::east(0).timestamp_opt(value as i64, 0), &value)
}
}
// try!-like function to convert a LocalResult into a serde-ish Result
fn from<T, E, V>(me: LocalResult<T>, ts: V) -> Result<T, E>
fn from<T, E, V>(me: LocalResult<T>, ts: &V) -> Result<T, E>
where E: de::Error,
V: fmt::Display,
T: fmt::Display,