Fix clippy error of map_err

This commit is contained in:
Rodgers 2021-07-09 18:59:54 +07:00
parent 90c924588a
commit 0c46512900

View File

@ -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)
}
}