mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
enable dead_code lint
This commit is contained in:
parent
518d0c9cf3
commit
d7e945f4c5
17 changed files with 15 additions and 137 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use ruma::{CanonicalJsonObject, EventId};
|
||||
|
||||
use crate::{database::KeyValueDatabase, service, Error, PduEvent, Result};
|
||||
use crate::{database::KeyValueDatabase, service, Error, Result};
|
||||
|
||||
impl service::rooms::outlier::Data for KeyValueDatabase {
|
||||
fn get_outlier_pdu_json(
|
||||
|
|
@ -16,16 +16,6 @@ impl service::rooms::outlier::Data for KeyValueDatabase {
|
|||
)
|
||||
}
|
||||
|
||||
fn get_outlier_pdu(&self, event_id: &EventId) -> Result<Option<PduEvent>> {
|
||||
self.eventid_outlierpdu.get(event_id.as_bytes())?.map_or(
|
||||
Ok(None),
|
||||
|pdu| {
|
||||
serde_json::from_slice(&pdu)
|
||||
.map_err(|_| Error::bad_database("Invalid PDU in db."))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, pdu))]
|
||||
fn add_pdu_outlier(
|
||||
&self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue