Replace unwrap() with try!()
This commit is contained in:
parent
a07047b61a
commit
9982b3251c
1 changed files with 1 additions and 7 deletions
|
@ -120,13 +120,7 @@ impl Tagable for EntryHeader {
|
|||
fn has_tags(&self, tags: &[Tag]) -> Result<bool> {
|
||||
let mut result = true;
|
||||
for tag in tags {
|
||||
let check = self.has_tag(tag);
|
||||
if check.is_err() {
|
||||
return Err(check.unwrap_err());
|
||||
}
|
||||
let check = check.unwrap();
|
||||
|
||||
result = result && check;
|
||||
result = result && try!(self.has_tag(tag));
|
||||
}
|
||||
|
||||
Ok(result)
|
||||
|
|
Loading…
Reference in a new issue