forked from jmug/stoatchat
refactor: remove inspect_err debug code
This commit is contained in:
@@ -5,7 +5,8 @@ use revolt_models::v0::MessageSort;
|
||||
use revolt_result::Result;
|
||||
|
||||
use crate::{
|
||||
AppendMessage, DocumentId, FieldsMessage, IntoDocumentPath, Message, MessageQuery, MessageTimePeriod, MongoDb, PartialMessage
|
||||
AppendMessage, DocumentId, FieldsMessage, IntoDocumentPath, Message, MessageQuery,
|
||||
MessageTimePeriod, MongoDb, PartialMessage,
|
||||
};
|
||||
|
||||
use super::AbstractMessages;
|
||||
@@ -181,7 +182,12 @@ impl AbstractMessages for MongoDb {
|
||||
}
|
||||
|
||||
/// Update a given message with new information
|
||||
async fn update_message(&self, id: &str, message: &PartialMessage, remove: Vec<FieldsMessage>) -> Result<()> {
|
||||
async fn update_message(
|
||||
&self,
|
||||
id: &str,
|
||||
message: &PartialMessage,
|
||||
remove: Vec<FieldsMessage>,
|
||||
) -> Result<()> {
|
||||
query!(
|
||||
self,
|
||||
update_one_by_id,
|
||||
@@ -190,7 +196,8 @@ impl AbstractMessages for MongoDb {
|
||||
message,
|
||||
remove.iter().map(|x| x as &dyn IntoDocumentPath).collect(),
|
||||
None
|
||||
).map(|_| ())
|
||||
)
|
||||
.map(|_| ())
|
||||
}
|
||||
|
||||
/// Append information to a given message
|
||||
@@ -311,7 +318,7 @@ impl AbstractMessages for MongoDb {
|
||||
impl IntoDocumentPath for FieldsMessage {
|
||||
fn as_path(&self) -> Option<&'static str> {
|
||||
Some(match self {
|
||||
FieldsMessage::Pinned => "pinned"
|
||||
FieldsMessage::Pinned => "pinned",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user