diff --git a/lib/entry/libimagentrycategory/src/store.rs b/lib/entry/libimagentrycategory/src/store.rs index 5fc87347..e1fb929a 100644 --- a/lib/entry/libimagentrycategory/src/store.rs +++ b/lib/entry/libimagentrycategory/src/store.rs @@ -139,8 +139,6 @@ mod tests { let res = store.create_category(category_name); assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res)); - let res = res.unwrap(); - assert!(res); } #[test] @@ -148,11 +146,10 @@ mod tests { let category_name = "examplecategory"; let store = get_store(); - let res = store.create_category(category_name); - - assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res)); - let res = res.unwrap(); - assert!(res); + { + let res = store.create_category(category_name); + assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res)); + } let category = store.get(PathBuf::from(format!("category/{}", category_name))); @@ -167,11 +164,11 @@ mod tests { let _ = env_logger::try_init(); let category_name = "examplecategory"; let store = get_store(); - let res = store.create_category(category_name); - assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res)); - let res = res.unwrap(); - assert!(res); + { + let res = store.create_category(category_name); + assert!(res.is_ok(), format!("Expected Ok(_), got: {:?}", res)); + } let id = PathBuf::from(format!("category/{}", category_name)); println!("Trying: {:?}", id);