diff --git a/json-api/db/src/channels.rs b/json-api/db/src/channels.rs index 8effdcb..0903b9c 100644 --- a/json-api/db/src/channels.rs +++ b/json-api/db/src/channels.rs @@ -40,7 +40,7 @@ impl FromDB for Channel { if let Ok((_, row)) = result { return match row { Some(row) => Response::Row(Channel { - id: id, + id, name: row.1, description: row.2, kind: row.3 @@ -109,8 +109,8 @@ impl FromDB for Channel { let (id, name, desc, k): (UBigInt, VarChar, Option, Integer) = mysql_async::from_row(row); Channel { - id: id, - name: name, + id, + name, description: desc, kind: k } @@ -177,10 +177,10 @@ impl Channel { Ok((_, id_opt)) => { if let Some(id) = id_opt { Response::Row(Channel { - id: id, + id, name: name.into(), description: Some(desc.into()), - kind: kind + kind }) } else { Response::Empty }