(
fmt: &mut fmt::Formatter<'_>,
errs: &ValidationErrors,
path: &str,
)
| 18 | path: &str, |
| 19 | ) -> fmt::Result { |
| 20 | fn display_struct( |
| 21 | fmt: &mut fmt::Formatter<'_>, |
| 22 | errs: &ValidationErrors, |
| 23 | path: &str, |
| 24 | ) -> fmt::Result { |
| 25 | let mut full_path = String::new(); |
| 26 | write!(&mut full_path, "{}.", path)?; |
| 27 | let base_len = full_path.len(); |
| 28 | for (path, err) in errs.errors() { |
| 29 | write!(&mut full_path, "{}", path)?; |
| 30 | display_errors(fmt, err, &full_path)?; |
| 31 | full_path.truncate(base_len); |
| 32 | } |
| 33 | Ok(()) |
| 34 | } |
| 35 | |
| 36 | match errs { |
| 37 | ValidationErrorsKind::Field(errs) => { |
no test coverage detected