style: formatting

This commit is contained in:
Matouš Volf
2024-08-22 22:06:01 +02:00
parent 53440e6afc
commit c92890305d
3 changed files with 24 additions and 12 deletions

View File

@ -37,7 +37,7 @@ impl<T: Display> Display for ErrorVec<T> {
impl<T> FromStr for ErrorVec<T> {
type Err = ();
fn from_str(s: &str) -> Result<Self, Self::Err> {
fn from_str(_: &str) -> Result<Self, Self::Err> {
Ok(ErrorVec { errors: Vec::new() })
}
}

View File

@ -22,12 +22,12 @@ impl From<ValidationErrors> for ErrorVec<ProjectCreateError> {
.map(|validation_error| validation_error.code.as_ref())
.map(|code| match code {
"title_length" => ProjectCreateError::TitleLengthInvalid,
_ => panic!("unexpected validation error code: {code}"),
_ => panic!("Unexpected validation error code: `{code}`."),
})
.collect::<Vec<ProjectCreateError>>(),
_ => panic!("unexpected validation error kind"),
_ => panic!("Unexpected validation error kind."),
},
_ => panic!("unexpected validation field name: {field}"),
_ => panic!("Unexpected validation field name: `{field}`."),
})
.collect::<Vec<ProjectCreateError>>()
.into()