From c2ad0c0287bed844df35896f6bdfb85658748966 Mon Sep 17 00:00:00 2001 From: Ole Martin Ruud Date: Fri, 10 Apr 2020 05:30:51 +0200 Subject: Specify static lifetime for field_errors --- validator/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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> { + pub fn field_errors(&self) -> HashMap<&'static str, &Vec> { self.0 .iter() .filter_map(|(k, v)| { -- cgit v1.2.3