Impl From<ListType> for i32 instead of Into<i32> for ListType

This commit is contained in:
Kitaiti Makoto 2021-01-16 00:49:34 +09:00
parent 6eee4b0b65
commit 4a15bef34f

View file

@ -30,9 +30,9 @@ impl TryFrom<i32> for ListType {
} }
} }
impl Into<i32> for ListType { impl From<ListType> for i32 {
fn into(self) -> i32 { fn from(list_type: ListType) -> Self {
match self { match list_type {
ListType::User => 0, ListType::User => 0,
ListType::Blog => 1, ListType::Blog => 1,
ListType::Word => 2, ListType::Word => 2,