Port from Rocket to axum
This commit is contained in:
parent
8709c3ae7b
commit
1f7b3fa4ac
52 changed files with 1064 additions and 1885 deletions
14
src/lib.rs
14
src/lib.rs
|
@ -7,8 +7,6 @@
|
|||
#![allow(clippy::suspicious_else_formatting)]
|
||||
#![deny(clippy::dbg_macro)]
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
mod config;
|
||||
mod database;
|
||||
mod error;
|
||||
|
@ -24,16 +22,4 @@ pub use config::Config;
|
|||
pub use database::Database;
|
||||
pub use error::{Error, Result};
|
||||
pub use pdu::PduEvent;
|
||||
pub use rocket::Config as RocketConfig;
|
||||
pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse};
|
||||
|
||||
pub struct State<'r, T: Send + Sync + 'static>(pub &'r T);
|
||||
|
||||
impl<'r, T: Send + Sync + 'static> Deref for State<'r, T> {
|
||||
type Target = T;
|
||||
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &T {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue