style: use Self in error enum impls

This commit is contained in:
2024-09-08 08:21:33 +02:00
parent ac97deb996
commit ac8d270df5
3 changed files with 8 additions and 8 deletions

View File

@ -36,7 +36,7 @@ impl From<ValidationErrors> for ErrorVec<ProjectError> {
impl From<diesel::result::Error> for ProjectError {
fn from(_: diesel::result::Error) -> Self {
ProjectError::Error(Error::ServerInternal)
Self::Error(Error::ServerInternal)
}
}
@ -52,6 +52,6 @@ impl FromStr for ProjectError {
type Err = ();
fn from_str(_: &str) -> Result<Self, Self::Err> {
Ok(ProjectError::Error(Error::ServerInternal))
Ok(Self::Error(Error::ServerInternal))
}
}