mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-18 15:31:02 +00:00
Simplify redundant closure
This commit is contained in:
@@ -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)),
|
||||||
|
|||||||
Reference in New Issue
Block a user