diff options
| author | Vincent Prouillet | 2020-04-12 18:16:46 +0200 |
|---|---|---|
| committer | GitHub | 2020-04-12 18:16:46 +0200 |
| commit | 2182f52e49c80ec924e0e6bdf2cc5b587e40c42e (patch) | |
| tree | 4df5e3cfce9e67c8273cd71eaa206ba8ff295907 | |
| parent | f125853be305688155eddc22257954e698d935e5 (diff) | |
| parent | c2ad0c0287bed844df35896f6bdfb85658748966 (diff) | |
| download | validator-2182f52e49c80ec924e0e6bdf2cc5b587e40c42e.tar.bz2 | |
Merge pull request #97 from barskern/static-str-field-errors
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 2178db4..27467c0 100644 --- a/validator/src/types.rs +++ b/validator/src/types.rs @@ -122,7 +122,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)| { |
