[Auto] lib/entry/tag: Fix Clippy warnings

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
flip1995 2019-08-27 10:50:45 +02:00 committed by Matthias Beyer
parent c02e6580be
commit 1569442fee

View file

@ -60,7 +60,7 @@ impl Tagable for Entry {
self.get_header() self.get_header()
.read_partial::<TagHeader>()? .read_partial::<TagHeader>()?
.map(|header| { .map(|header| {
let _ = header.values header.values
.iter() .iter()
.map(is_tag_str) .map(is_tag_str)
.collect::<Result<_>>()?; .collect::<Result<_>>()?;
@ -88,7 +88,7 @@ impl Tagable for Entry {
} }
fn add_tag(&mut self, t: Tag) -> Result<()> { fn add_tag(&mut self, t: Tag) -> Result<()> {
let _ = is_tag_str(&t)?; is_tag_str(&t)?;
let mut tags = self.get_tags()?; let mut tags = self.get_tags()?;
debug!("Pushing tag = {:?} to list = {:?}", t, tags); debug!("Pushing tag = {:?} to list = {:?}", t, tags);
@ -97,7 +97,7 @@ impl Tagable for Entry {
} }
fn remove_tag(&mut self, t: Tag) -> Result<()> { fn remove_tag(&mut self, t: Tag) -> Result<()> {
let _ = is_tag_str(&t)?; is_tag_str(&t)?;
let mut tags = self.get_tags()?; let mut tags = self.get_tags()?;
tags.retain(|tag| *tag != t); tags.retain(|tag| *tag != t);