Fix clippy error of map_err
This commit is contained in:
parent
90c924588a
commit
0c46512900
|
@ -80,7 +80,7 @@ where
|
|||
/// ```
|
||||
fn is_valid_with_extensions(&self, value: &Value) -> Result<(), Error> {
|
||||
// By default, use is_valid method to keep compatible with previous version
|
||||
self.is_valid(value).map_err(|reason| Error::new(reason))
|
||||
self.is_valid(value).map_err(Error::new)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user