From 4bd156fdb36da577ff180915a5706c77bad6f4b6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 21 Jan 2018 21:47:56 +0100 Subject: [PATCH] Remove unecessary String instantiation --- lib/entry/libimagentrycategory/src/register.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/entry/libimagentrycategory/src/register.rs b/lib/entry/libimagentrycategory/src/register.rs index 4d21c37a..219d267c 100644 --- a/lib/entry/libimagentrycategory/src/register.rs +++ b/lib/entry/libimagentrycategory/src/register.rs @@ -266,7 +266,7 @@ impl<'a> Iterator for CategoryNameIter<'a> { fn next(&mut self) -> Option { // TODO: Optimize me with lazy_static - let query = String::from(CATEGORY_REGISTER_NAME_FIELD_PATH); + let query = CATEGORY_REGISTER_NAME_FIELD_PATH; self.1 .next() @@ -275,7 +275,7 @@ impl<'a> Iterator for CategoryNameIter<'a> { .get(sid)? .ok_or_else(|| CE::from_kind(CEK::StoreReadError))? .get_header() - .read_string(&query) + .read_string(query) .chain_err(|| CEK::HeaderReadError)? .map(Category::from) .ok_or_else(|| CE::from_kind(CEK::StoreReadError))