From 07d4c45b3f21f07416f3d19bde122f11095467b4 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 5 Sep 2016 00:39:43 +0200 Subject: [PATCH] Refactor long line for more readability --- libimagtodo/src/task.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libimagtodo/src/task.rs b/libimagtodo/src/task.rs index d15d9dea..6b3dc990 100644 --- a/libimagtodo/src/task.rs +++ b/libimagtodo/src/task.rs @@ -207,9 +207,8 @@ impl<'a> IntoTask<'a> for TTask { .and_then(|mut fle| { { let mut hdr = fle.get_header_mut(); - if try!(hdr.read("todo").map_err_into(TodoErrorKind::StoreError)) - .is_none() - { + let read = hdr.read("todo").map_err_into(TodoErrorKind::StoreError); + if try!(read).is_none() { try!(hdr .set("todo", Value::Table(BTreeMap::new())) .map_err_into(TodoErrorKind::StoreError));