mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 08:41: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
|
|
@ -39,6 +39,8 @@ pub(crate) trait Data: Send + Sync {
|
|||
) -> Result<()>;
|
||||
|
||||
/// Returns the private read marker.
|
||||
// TODO: Implement MSC2285
|
||||
#[allow(dead_code)]
|
||||
fn private_read_get(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
|
|
@ -46,6 +48,8 @@ pub(crate) trait Data: Send + Sync {
|
|||
) -> Result<Option<u64>>;
|
||||
|
||||
/// Returns the count of the last typing update in this room.
|
||||
// TODO: Implement MSC2285
|
||||
#[allow(dead_code)]
|
||||
fn last_privateread_update(
|
||||
&self,
|
||||
user_id: &UserId,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use ruma::{CanonicalJsonObject, EventId};
|
||||
|
||||
use crate::{PduEvent, Result};
|
||||
use crate::Result;
|
||||
|
||||
pub(crate) trait Data: Send + Sync {
|
||||
/// Returns the pdu from the outlier tree.
|
||||
|
|
@ -8,7 +8,7 @@ pub(crate) trait Data: Send + Sync {
|
|||
&self,
|
||||
event_id: &EventId,
|
||||
) -> Result<Option<CanonicalJsonObject>>;
|
||||
fn get_outlier_pdu(&self, event_id: &EventId) -> Result<Option<PduEvent>>;
|
||||
|
||||
/// Append the PDU as an outlier.
|
||||
fn add_pdu_outlier(
|
||||
&self,
|
||||
|
|
|
|||
|
|
@ -313,15 +313,6 @@ impl Service {
|
|||
self.db.room_invited_count(room_id)
|
||||
}
|
||||
|
||||
/// Returns an iterator over all User IDs who ever joined a room.
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub(crate) fn room_useroncejoined<'a>(
|
||||
&'a self,
|
||||
room_id: &RoomId,
|
||||
) -> impl Iterator<Item = Result<OwnedUserId>> + 'a {
|
||||
self.db.room_useroncejoined(room_id)
|
||||
}
|
||||
|
||||
/// Returns an iterator over all invited members of a room.
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub(crate) fn room_members_invited<'a>(
|
||||
|
|
|
|||
|
|
@ -68,12 +68,6 @@ pub(crate) trait Data: Send + Sync {
|
|||
|
||||
fn room_invited_count(&self, room_id: &RoomId) -> Result<Option<u64>>;
|
||||
|
||||
/// Returns an iterator over all User IDs who ever joined a room.
|
||||
fn room_useroncejoined<'a>(
|
||||
&'a self,
|
||||
room_id: &RoomId,
|
||||
) -> Box<dyn Iterator<Item = Result<OwnedUserId>> + 'a>;
|
||||
|
||||
/// Returns an iterator over all invited members of a room.
|
||||
fn room_members_invited<'a>(
|
||||
&'a self,
|
||||
|
|
@ -137,5 +131,7 @@ pub(crate) trait Data: Send + Sync {
|
|||
|
||||
fn is_invited(&self, user_id: &UserId, room_id: &RoomId) -> Result<bool>;
|
||||
|
||||
// TODO: Use this when implementing sync filtering
|
||||
#[allow(dead_code)]
|
||||
fn is_left(&self, user_id: &UserId, room_id: &RoomId) -> Result<bool>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue