made the Option<> changes and some stylistics
This commit is contained in:
+13
-12
@@ -195,36 +195,36 @@ impl From<TwilightUser> for User {
|
||||
pub struct Message {
|
||||
pub id: i64,
|
||||
pub author_id: i64,
|
||||
pub author_name: Option<String>,
|
||||
pub author_avatar_url: Option<String>,
|
||||
pub author_name: String,
|
||||
pub author_avatar_url: String,
|
||||
pub author_mask: Option<String>,
|
||||
pub content: Option<String>,
|
||||
pub content: String,
|
||||
pub attachments: Option<Vec<String>>,
|
||||
pub sticker: Option<i64>,
|
||||
pub propagation_message_id: Option<i64>,
|
||||
pub propagation_channel_id: Option<i64>,
|
||||
pub replying_to_id: Option<i64>,
|
||||
pub is_deleted: Option<bool>,
|
||||
pub is_edited: Option<bool>,
|
||||
pub is_censored: Option<bool>,
|
||||
pub is_deleted: bool,
|
||||
pub is_edited: bool,
|
||||
pub is_censored: bool,
|
||||
}
|
||||
|
||||
impl<'a> Object<'a> for Message {
|
||||
type Row = (
|
||||
i64,
|
||||
i64,
|
||||
String,
|
||||
String,
|
||||
Option<String>,
|
||||
Option<String>,
|
||||
Option<String>,
|
||||
Option<String>,
|
||||
String,
|
||||
Option<Vec<String>>,
|
||||
Option<i64>,
|
||||
Option<i64>,
|
||||
Option<i64>,
|
||||
Option<i64>,
|
||||
Option<bool>,
|
||||
Option<bool>,
|
||||
Option<bool>,
|
||||
bool,
|
||||
bool,
|
||||
bool,
|
||||
);
|
||||
fn from_row(row: Self::Row) -> Self {
|
||||
Self {
|
||||
@@ -398,6 +398,7 @@ impl Report {
|
||||
)
|
||||
.await
|
||||
.map_err(DatabaseError::QueryError)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user