More warning removals and more db-lib result wrapping
This should be everything now
This commit is contained in:
@@ -3,7 +3,7 @@ use mysql_async::prelude::Queryable;
|
||||
use mysql_async::Error as SqlError;
|
||||
|
||||
use crate::{Channel, UBigInt, Integer};
|
||||
use crate::{sql_err, Response};
|
||||
use crate::Response;
|
||||
|
||||
use rand::RngCore;
|
||||
|
||||
@@ -75,11 +75,8 @@ impl Channel {
|
||||
let mut conn = p.get_conn().await?;
|
||||
|
||||
let q = "DELETE FROM channels WHERE id = :id";
|
||||
let result = conn.exec_drop(q, params!{"id" => id}).await;
|
||||
return match result {
|
||||
Ok(_) => Ok(Response::Success),
|
||||
Err(sql) => Ok(Response::Other(sql_err!(sql)))
|
||||
}
|
||||
conn.exec_drop(q, params!{"id" => id}).await?;
|
||||
Ok(Response::Success)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user