Remove unecessary String instantiation
This commit is contained in:
parent
2c133de5bc
commit
4bd156fdb3
1 changed files with 2 additions and 2 deletions
|
@ -266,7 +266,7 @@ impl<'a> Iterator for CategoryNameIter<'a> {
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
// TODO: Optimize me with lazy_static
|
// TODO: Optimize me with lazy_static
|
||||||
let query = String::from(CATEGORY_REGISTER_NAME_FIELD_PATH);
|
let query = CATEGORY_REGISTER_NAME_FIELD_PATH;
|
||||||
|
|
||||||
self.1
|
self.1
|
||||||
.next()
|
.next()
|
||||||
|
@ -275,7 +275,7 @@ impl<'a> Iterator for CategoryNameIter<'a> {
|
||||||
.get(sid)?
|
.get(sid)?
|
||||||
.ok_or_else(|| CE::from_kind(CEK::StoreReadError))?
|
.ok_or_else(|| CE::from_kind(CEK::StoreReadError))?
|
||||||
.get_header()
|
.get_header()
|
||||||
.read_string(&query)
|
.read_string(query)
|
||||||
.chain_err(|| CEK::HeaderReadError)?
|
.chain_err(|| CEK::HeaderReadError)?
|
||||||
.map(Category::from)
|
.map(Category::from)
|
||||||
.ok_or_else(|| CE::from_kind(CEK::StoreReadError))
|
.ok_or_else(|| CE::from_kind(CEK::StoreReadError))
|
||||||
|
|
Loading…
Reference in a new issue