mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 08:41:24 +01:00
enable dead_code lint
And delete all the dead code. And add some cfgs for feature-specific items.
This commit is contained in:
parent
d748544f0e
commit
2ff08c9fc4
8 changed files with 6 additions and 52 deletions
|
|
@ -8,7 +8,7 @@ use futures_util::Future;
|
|||
use regex::RegexSet;
|
||||
use ruma::{
|
||||
api::appservice::{Namespace, Registration},
|
||||
RoomAliasId, RoomId, UserId,
|
||||
RoomAliasId, UserId,
|
||||
};
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
|
|
@ -207,14 +207,6 @@ impl Service {
|
|||
.any(|info| info.aliases.is_exclusive_match(alias.as_str()))
|
||||
}
|
||||
|
||||
// Checks if a given room id matches any exclusive appservice regex
|
||||
pub(crate) async fn is_exclusive_room_id(&self, room_id: &RoomId) -> bool {
|
||||
self.read()
|
||||
.await
|
||||
.values()
|
||||
.any(|info| info.rooms.is_exclusive_match(room_id.as_str()))
|
||||
}
|
||||
|
||||
pub(crate) fn read(
|
||||
&self,
|
||||
) -> impl Future<Output = tokio::sync::RwLockReadGuard<'_, BTreeMap<String, RegistrationInfo>>>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue