Simplify return type of most route handlers
This commit is contained in:
parent
77a87881c9
commit
5fa9190117
38 changed files with 358 additions and 414 deletions
|
@ -1,6 +1,10 @@
|
|||
use super::{super::Config, watchers::Watchers, DatabaseEngine, Tree};
|
||||
use crate::{utils, Result};
|
||||
use std::{future::Future, pin::Pin, sync::Arc, sync::RwLock};
|
||||
use std::{
|
||||
future::Future,
|
||||
pin::Pin,
|
||||
sync::{Arc, RwLock},
|
||||
};
|
||||
|
||||
pub struct Engine {
|
||||
rocks: rocksdb::DBWithThreadMode<rocksdb::MultiThreaded>,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{database::Config, server_server::FedDest, utils, ConduitResult, Error, Result};
|
||||
use crate::{database::Config, server_server::FedDest, utils, Error, Result};
|
||||
use ruma::{
|
||||
api::{
|
||||
client::r0::sync::sync_events,
|
||||
|
@ -27,8 +27,8 @@ type WellKnownMap = HashMap<Box<ServerName>, (FedDest, String)>;
|
|||
type TlsNameMap = HashMap<String, (Vec<IpAddr>, u16)>;
|
||||
type RateLimitState = (Instant, u32); // Time if last failed try, number of failed tries
|
||||
type SyncHandle = (
|
||||
Option<String>, // since
|
||||
Receiver<Option<ConduitResult<sync_events::Response>>>, // rx
|
||||
Option<String>, // since
|
||||
Receiver<Option<Result<sync_events::Response>>>, // rx
|
||||
);
|
||||
|
||||
pub struct Globals {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use std::collections::BTreeMap;
|
||||
use std::sync::Arc;
|
||||
use std::sync::RwLock;
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
sync::{Arc, RwLock},
|
||||
};
|
||||
|
||||
use crate::{client_server::SESSION_ID_LENGTH, utils, Error, Result};
|
||||
use ruma::{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue