Simplify redundant closure

This commit is contained in:
David Tolnay 2016-05-13 10:53:03 -07:00
parent 004dcaec3b
commit 76a321db5c

View File

@ -118,7 +118,7 @@ impl Visitor for BoolVisitor {
fn visit_str<E>(&mut self, s: &str) -> Result<bool, E> fn visit_str<E>(&mut self, s: &str) -> Result<bool, E>
where E: Error, where E: Error,
{ {
match s.trim_matches(|c| ::utils::Pattern_White_Space(c)) { match s.trim_matches(::utils::Pattern_White_Space) {
"true" => Ok(true), "true" => Ok(true),
"false" => Ok(false), "false" => Ok(false),
_ => Err(Error::invalid_type(Type::Bool)), _ => Err(Error::invalid_type(Type::Bool)),