mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 08:41:24 +01:00
Use self instead of going through services()
This commit is contained in:
parent
f52cf53931
commit
341f4213d0
8 changed files with 26 additions and 60 deletions
|
|
@ -11,7 +11,7 @@ use ruma::{
|
|||
};
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use crate::{services, Result};
|
||||
use crate::Result;
|
||||
|
||||
/// Compiled regular expressions for a namespace.
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
@ -160,15 +160,9 @@ impl Service {
|
|||
&self,
|
||||
service_name: &str,
|
||||
) -> Result<()> {
|
||||
services()
|
||||
.appservice
|
||||
.registration_info
|
||||
.write()
|
||||
.await
|
||||
.remove(service_name)
|
||||
.ok_or_else(|| {
|
||||
crate::Error::AdminCommand("Appservice not found")
|
||||
})?;
|
||||
self.registration_info.write().await.remove(service_name).ok_or_else(
|
||||
|| crate::Error::AdminCommand("Appservice not found"),
|
||||
)?;
|
||||
|
||||
self.db.unregister_appservice(service_name)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue