aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOle Martin Ruud2020-04-10 05:30:51 +0200
committerOle Martin Ruud2020-04-10 05:30:51 +0200
commitc2ad0c0287bed844df35896f6bdfb85658748966 (patch)
treed308472632bbfbd938731901f9139956c039d46f
parent6afe9fd060f444777ebd6850c6017d6cd15a25d7 (diff)
downloadvalidator-c2ad0c0287bed844df35896f6bdfb85658748966.tar.bz2
Specify static lifetime for field_errors
-rw-r--r--validator/src/types.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/validator/src/types.rs b/validator/src/types.rs
index 5d90d04..932a037 100644
--- a/validator/src/types.rs
+++ b/validator/src/types.rs
@@ -121,7 +121,7 @@ impl ValidationErrors {
}
/// Returns a map of only field-level validation errors found for the struct that was validated.
- pub fn field_errors(&self) -> HashMap<&str, &Vec<ValidationError>> {
+ pub fn field_errors(&self) -> HashMap<&'static str, &Vec<ValidationError>> {
self.0
.iter()
.filter_map(|(k, v)| {