Fix clippy warnings

And fix bench.
This commit is contained in:
gwenn
2017-02-24 20:10:51 +01:00
parent 4918fb8f50
commit faa94d1246
5 changed files with 18 additions and 17 deletions

View File

@@ -104,9 +104,8 @@ impl FromSql for DateTime<UTC> {
Cow::Borrowed(s)
};
match DateTime::parse_from_rfc3339(&s) {
Ok(dt) => return Ok(dt.with_timezone(&UTC)),
Err(_) => (),
if let Ok(dt) = DateTime::parse_from_rfc3339(&s) {
return Ok(dt.with_timezone(&UTC));
}
}