From 4a15bef34fc49701d2fdf519362205df093c6499 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 16 Jan 2021 00:49:34 +0900 Subject: [PATCH] Impl From for i32 instead of Into for ListType --- plume-models/src/lists.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plume-models/src/lists.rs b/plume-models/src/lists.rs index e8fa9efa..895120d5 100644 --- a/plume-models/src/lists.rs +++ b/plume-models/src/lists.rs @@ -30,9 +30,9 @@ impl TryFrom for ListType { } } -impl Into for ListType { - fn into(self) -> i32 { - match self { +impl From for i32 { + fn from(list_type: ListType) -> Self { + match list_type { ListType::User => 0, ListType::Blog => 1, ListType::Word => 2,