diff options
| author | Ole Martin Ruud | 2020-04-10 05:30:51 +0200 |
|---|---|---|
| committer | Ole Martin Ruud | 2020-04-10 05:30:51 +0200 |
| commit | c2ad0c0287bed844df35896f6bdfb85658748966 (patch) | |
| tree | d308472632bbfbd938731901f9139956c039d46f | |
| parent | 6afe9fd060f444777ebd6850c6017d6cd15a25d7 (diff) | |
| download | validator-c2ad0c0287bed844df35896f6bdfb85658748966.tar.bz2 | |
Specify static lifetime for field_errors
| -rw-r--r-- | validator/src/types.rs | 2 |
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)| { |
