Convert some Into impls into From impls
This commit is contained in:
parent
7f75bfa1ad
commit
aea2a6f836
9 changed files with 45 additions and 45 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue