3e389256f5
I removed some lint configuration in the process: * `#[allow(clippy::suspicious_else_formatting)]` because nothing is currently triggering it. * `#[warn(clippy::future_not_send)]` because some stuff under `src/lib.rs` is. And also like, auto-trait leakage generally means this isn't a problem, and if things really need to be `Send`, then you'll probably know to mark it manually. * `#[warn(rust_2018_idioms)]` and replaced it with `explicit-outlives-requirements = "warn"` which is the most useful lint in that group that isn't enabled by default.
22 lines
518 B
Rust
22 lines
518 B
Rust
pub mod api;
|
|
mod config;
|
|
mod database;
|
|
mod service;
|
|
mod utils;
|
|
|
|
use std::sync::RwLock;
|
|
|
|
pub use api::ruma_wrapper::{Ruma, RumaResponse};
|
|
pub use config::Config;
|
|
pub use database::KeyValueDatabase;
|
|
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() -> &'static Services {
|
|
SERVICES
|
|
.read()
|
|
.unwrap()
|
|
.expect("SERVICES should be initialized when this is called")
|
|
}
|