From e479c25c34c362a2db5e6e2175be2337d43d6fc5 Mon Sep 17 00:00:00 2001 From: dbr Date: Thu, 29 Apr 2021 10:41:17 +1000 Subject: [PATCH] Tidier --- taskchampion/src/storage/sqlite.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taskchampion/src/storage/sqlite.rs b/taskchampion/src/storage/sqlite.rs index 9736287d3..344650598 100644 --- a/taskchampion/src/storage/sqlite.rs +++ b/taskchampion/src/storage/sqlite.rs @@ -136,7 +136,7 @@ impl<'t> StorageTxn for Txn<'t> { .optional()?; // Get task from "stored" wrapper - Ok(result.and_then(|t: StoredTaskMap| Some(t.0))) + Ok(result.map(|t| t.0)) } fn create_task(&mut self, uuid: Uuid) -> anyhow::Result { @@ -221,7 +221,7 @@ impl<'t> StorageTxn for Txn<'t> { ) .optional()?; Ok(version - .and_then(|u| Some(u.0)) + .map(|u| u.0) .unwrap_or(DEFAULT_BASE_VERSION)) }