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 revolt_result::Result;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
AppendMessage, DocumentId, FieldsMessage, IntoDocumentPath, Message, MessageQuery, MessageTimePeriod, MongoDb, PartialMessage
|
AppendMessage, DocumentId, FieldsMessage, IntoDocumentPath, Message, MessageQuery,
|
||||||
|
MessageTimePeriod, MongoDb, PartialMessage,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::AbstractMessages;
|
use super::AbstractMessages;
|
||||||
@@ -181,7 +182,12 @@ impl AbstractMessages for MongoDb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Update a given message with new information
|
/// 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!(
|
query!(
|
||||||
self,
|
self,
|
||||||
update_one_by_id,
|
update_one_by_id,
|
||||||
@@ -190,7 +196,8 @@ impl AbstractMessages for MongoDb {
|
|||||||
message,
|
message,
|
||||||
remove.iter().map(|x| x as &dyn IntoDocumentPath).collect(),
|
remove.iter().map(|x| x as &dyn IntoDocumentPath).collect(),
|
||||||
None
|
None
|
||||||
).map(|_| ())
|
)
|
||||||
|
.map(|_| ())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Append information to a given message
|
/// Append information to a given message
|
||||||
@@ -311,7 +318,7 @@ impl AbstractMessages for MongoDb {
|
|||||||
impl IntoDocumentPath for FieldsMessage {
|
impl IntoDocumentPath for FieldsMessage {
|
||||||
fn as_path(&self) -> Option<&'static str> {
|
fn as_path(&self) -> Option<&'static str> {
|
||||||
Some(match self {
|
Some(match self {
|
||||||
FieldsMessage::Pinned => "pinned"
|
FieldsMessage::Pinned => "pinned",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user