Run nightly cargo fmt
parent
d0df8b495c
commit
0d55964d24
|
@ -1 +1 @@
|
||||||
merge_imports = true
|
imports_granularity="Crate"
|
||||||
|
|
|
@ -17,9 +17,11 @@ use log::info;
|
||||||
use rocket::futures::{self, channel::mpsc};
|
use rocket::futures::{self, channel::mpsc};
|
||||||
use ruma::{DeviceId, ServerName, UserId};
|
use ruma::{DeviceId, ServerName, UserId};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::collections::HashMap;
|
use std::{
|
||||||
use std::fs::remove_dir_all;
|
collections::HashMap,
|
||||||
use std::sync::{Arc, RwLock};
|
fs::remove_dir_all,
|
||||||
|
sync::{Arc, RwLock},
|
||||||
|
};
|
||||||
use tokio::sync::Semaphore;
|
use tokio::sync::Semaphore;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize)]
|
#[derive(Clone, Debug, Deserialize)]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
use crate::{utils, Error, Result};
|
use crate::{utils, Error, Result};
|
||||||
use std::collections::HashMap;
|
use std::{
|
||||||
use std::sync::{Arc, RwLock};
|
collections::HashMap,
|
||||||
|
sync::{Arc, RwLock},
|
||||||
|
};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Appservice {
|
pub struct Appservice {
|
||||||
|
|
|
@ -4,10 +4,11 @@ use ruma::{
|
||||||
api::federation::discovery::{ServerSigningKeys, VerifyKey},
|
api::federation::discovery::{ServerSigningKeys, VerifyKey},
|
||||||
ServerName, ServerSigningKeyId,
|
ServerName, ServerSigningKeyId,
|
||||||
};
|
};
|
||||||
use std::collections::{BTreeMap, HashMap};
|
use std::{
|
||||||
use std::sync::Arc;
|
collections::{BTreeMap, HashMap},
|
||||||
use std::sync::RwLock;
|
sync::{Arc, RwLock},
|
||||||
use std::time::Duration;
|
time::Duration,
|
||||||
|
};
|
||||||
use trust_dns_resolver::TokioAsyncResolver;
|
use trust_dns_resolver::TokioAsyncResolver;
|
||||||
|
|
||||||
pub const COUNTER: &str = "c";
|
pub const COUNTER: &str = "c";
|
||||||
|
|
|
@ -16,8 +16,7 @@ use ruma::{
|
||||||
ServerName,
|
ServerName,
|
||||||
};
|
};
|
||||||
use sled::IVec;
|
use sled::IVec;
|
||||||
use tokio::select;
|
use tokio::{select, sync::Semaphore};
|
||||||
use tokio::sync::Semaphore;
|
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Sending {
|
pub struct Sending {
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
use std::{collections::HashMap, sync::RwLock, time::Duration, time::Instant};
|
use std::{
|
||||||
|
collections::HashMap,
|
||||||
|
sync::RwLock,
|
||||||
|
time::{Duration, Instant},
|
||||||
|
};
|
||||||
|
|
||||||
use log::error;
|
use log::error;
|
||||||
use ruma::{
|
use ruma::{
|
||||||
|
|
10
src/main.rs
10
src/main.rs
|
@ -1,4 +1,4 @@
|
||||||
// #![warn(rust_2018_idioms)]
|
#![warn(rust_2018_idioms)]
|
||||||
|
|
||||||
pub mod appservice_server;
|
pub mod appservice_server;
|
||||||
pub mod client_server;
|
pub mod client_server;
|
||||||
|
@ -19,11 +19,15 @@ pub use rocket::State;
|
||||||
use ruma::api::client::error::ErrorKind;
|
use ruma::api::client::error::ErrorKind;
|
||||||
pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse};
|
pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse};
|
||||||
|
|
||||||
use rocket::figment::{
|
use rocket::{
|
||||||
|
catch, catchers,
|
||||||
|
fairing::AdHoc,
|
||||||
|
figment::{
|
||||||
providers::{Env, Format, Toml},
|
providers::{Env, Format, Toml},
|
||||||
Figment,
|
Figment,
|
||||||
|
},
|
||||||
|
routes, Request,
|
||||||
};
|
};
|
||||||
use rocket::{catch, catchers, fairing::AdHoc, routes, Request};
|
|
||||||
use tracing::span;
|
use tracing::span;
|
||||||
use tracing_subscriber::{prelude::*, Registry};
|
use tracing_subscriber::{prelude::*, Registry};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue