Fix clippy::or_fun_call

This commit is contained in:
Alan Du 2019-06-03 10:27:51 -04:00
parent 40424d4222
commit b28ca32db2
12 changed files with 29 additions and 26 deletions

View file

@ -125,8 +125,8 @@ fn parse_repeat(p: &mut TtCursor, transcriber: bool) -> Result<crate::Repeat, Pa
}
}
let sep = p.eat_seperator().ok_or(ParseError::Expected(String::from("separator")))?;
let rep = p.eat_punct().ok_or(ParseError::Expected(String::from("repeat")))?;
let sep = p.eat_seperator().ok_or_else(|| ParseError::Expected(String::from("separator")))?;
let rep = p.eat_punct().ok_or_else(|| ParseError::Expected(String::from("repeat")))?;
mk_repeat(rep.char, subtree, Some(sep))
}