1
Fork 0

Convert some Into impls into From impls

This commit is contained in:
Michael Goulet 2024-12-31 01:56:28 +00:00
parent 7f75bfa1ad
commit aea2a6f836
9 changed files with 45 additions and 45 deletions

View file

@ -45,12 +45,12 @@ pub enum TypeAnnotationNeeded {
E0284,
}
impl Into<ErrCode> for TypeAnnotationNeeded {
fn into(self) -> ErrCode {
match self {
Self::E0282 => E0282,
Self::E0283 => E0283,
Self::E0284 => E0284,
impl From<TypeAnnotationNeeded> for ErrCode {
fn from(val: TypeAnnotationNeeded) -> Self {
match val {
TypeAnnotationNeeded::E0282 => E0282,
TypeAnnotationNeeded::E0283 => E0283,
TypeAnnotationNeeded::E0284 => E0284,
}
}
}