cargo fmt

This commit is contained in:
Timo Kösters 2022-10-05 20:34:31 +02:00 committed by Nyaaori
parent 33a2b2b772
commit a4637e2ba1
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
119 changed files with 2787 additions and 1761 deletions

View file

@ -7,22 +7,27 @@
#![allow(clippy::suspicious_else_formatting)]
#![deny(clippy::dbg_macro)]
pub mod api;
mod config;
mod database;
mod service;
pub mod api;
mod utils;
use std::{cell::Cell, sync::{RwLock, Arc}};
use std::{
cell::Cell,
sync::{Arc, RwLock},
};
pub use config::Config;
pub use utils::error::{Error, Result};
pub use service::{Services, pdu::PduEvent};
pub use api::ruma_wrapper::{Ruma, RumaResponse};
pub use config::Config;
pub use service::{pdu::PduEvent, Services};
pub use utils::error::{Error, Result};
pub static SERVICES: RwLock<Option<&'static Services>> = RwLock::new(None);
pub fn services<'a>() -> &'static Services {
&SERVICES.read().unwrap().expect("SERVICES should be initialized when this is called")
&SERVICES
.read()
.unwrap()
.expect("SERVICES should be initialized when this is called")
}