summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2022-10-05 20:34:31 +0200
committerNyaaori <+@nyaaori.cat>2022-10-10 14:02:01 +0200
commita4637e2ba1093065a6fda3fa2ad2b2b9f30eea63 (patch)
tree2d31313957d699875fc61f570686318b523ae0f1 /src/lib.rs
parent33a2b2b7729bb40253fd174d99ad773869b5ecfe (diff)
downloadconduit-a4637e2ba1093065a6fda3fa2ad2b2b9f30eea63.zip
cargo fmt
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index c103d52..e6421e8 100644
--- a/src/lib.rs
+++ b/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 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")
}
-