diff options
author | Timo Kösters <timo@koesters.xyz> | 2022-10-05 20:34:31 +0200 |
---|---|---|
committer | Nyaaori <+@nyaaori.cat> | 2022-10-10 14:02:01 +0200 |
commit | a4637e2ba1093065a6fda3fa2ad2b2b9f30eea63 (patch) | |
tree | 2d31313957d699875fc61f570686318b523ae0f1 /src/lib.rs | |
parent | 33a2b2b7729bb40253fd174d99ad773869b5ecfe (diff) | |
download | conduit-a4637e2ba1093065a6fda3fa2ad2b2b9f30eea63.zip |
cargo fmt
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -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 api::ruma_wrapper::{Ruma, RumaResponse}; pub use config::Config; +pub use service::{pdu::PduEvent, Services}; pub use utils::error::{Error, Result}; -pub use service::{Services, pdu::PduEvent}; -pub use api::ruma_wrapper::{Ruma, RumaResponse}; 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") } - |