cargo fmt
This commit is contained in:
parent
33a2b2b772
commit
a4637e2ba1
119 changed files with 2787 additions and 1761 deletions
19
src/lib.rs
19
src/lib.rs
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue