remove some various unused functions and mark some possibly important ones *for now*

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-22 23:54:56 -04:00 committed by June
parent 66bb88a03a
commit 17d0c869b0
11 changed files with 41 additions and 36 deletions

View file

@ -16,6 +16,9 @@ impl Service {
}
/// Returns the pdu from the outlier tree.
///
/// TODO: use this?
#[allow(dead_code)]
pub(crate) fn get_pdu_outlier(&self, event_id: &EventId) -> Result<Option<PduEvent>> {
self.db.get_outlier_pdu(event_id)
}

View file

@ -21,8 +21,14 @@ pub(crate) trait Data: Send + Sync {
fn private_read_set(&self, room_id: &RoomId, user_id: &UserId, count: u64) -> Result<()>;
/// Returns the private read marker.
///
/// TODO: use this?
#[allow(dead_code)]
fn private_read_get(&self, room_id: &RoomId, user_id: &UserId) -> Result<Option<u64>>;
/// Returns the count of the last typing update in this room.
///
/// TODO: use this?
#[allow(dead_code)]
fn last_privateread_update(&self, user_id: &UserId, room_id: &RoomId) -> Result<u64>;
}

View file

@ -47,6 +47,9 @@ 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.
///
/// TODO: use this?
#[allow(dead_code)]
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.
@ -83,5 +86,8 @@ pub(crate) trait Data: Send + Sync {
/// Add the given servers the list to accept or decline invites via for a
/// given room.
///
/// TODO: use this?
#[allow(dead_code)]
fn add_servers_invite_via(&self, room_id: &RoomId, servers: &[OwnedServerName]) -> Result<()>;
}

View file

@ -153,6 +153,9 @@ impl Service {
*/
/// Returns the version of a room, if known
///
/// TODO: use this?
#[allow(dead_code)]
pub(crate) fn get_room_version(&self, room_id: &RoomId) -> Result<Option<RoomVersionId>> {
let create_event = services()
.rooms
@ -188,6 +191,9 @@ impl Service {
/// Returns the pdu.
///
/// Checks the `eventid_outlierpdu` Tree if not found in the timeline.
///
/// TODO: use this?
#[allow(dead_code)]
pub(crate) fn get_non_outlier_pdu(&self, event_id: &EventId) -> Result<Option<PduEvent>> {
self.db.get_non_outlier_pdu(event_id)
}