From 4114c9458519508caeaf38d7e1b24555ee6dea3f Mon Sep 17 00:00:00 2001 From: gwenn Date: Fri, 26 Jun 2020 19:22:20 +0200 Subject: [PATCH] Clippy --- src/types/time.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/time.rs b/src/types/time.rs index 097b22a..aa3e38d 100644 --- a/src/types/time.rs +++ b/src/types/time.rs @@ -23,10 +23,10 @@ impl FromSql for time::Timespec { match s.len() { 19 => time::strptime(s, CURRENT_TIMESTAMP_FMT), _ => time::strptime(s, SQLITE_DATETIME_FMT).or_else(|err| { - time::strptime(s, SQLITE_DATETIME_FMT_LEGACY).or_else(|_| Err(err)) + time::strptime(s, SQLITE_DATETIME_FMT_LEGACY).map_err(|_| err) }), } - .or_else(|err| Err(FromSqlError::Other(Box::new(err)))) + .map_err(|err| FromSqlError::Other(Box::new(err))) }) .map(|tm| tm.to_timespec()) }