diff --git a/nix/shell.nix b/nix/shell.nix index bd070fe6..584a6bb3 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -23,7 +23,7 @@ mkShell { }; # Development tools - nativeBuildInputs = default.nativeBuildInputs ++ [ + nativeBuildInputs = [ # Always use nightly rustfmt because most of its options are unstable # # This needs to come before `toolchain` in this list, otherwise @@ -57,5 +57,5 @@ mkShell { # Useful for editing the book locally mdbook - ]; + ] ++ default.nativeBuildInputs ; } diff --git a/src/api/ruma_wrapper/axum.rs b/src/api/ruma_wrapper/axum.rs index 047f7dcf..aaabb1c6 100644 --- a/src/api/ruma_wrapper/axum.rs +++ b/src/api/ruma_wrapper/axum.rs @@ -7,8 +7,11 @@ use axum::{ response::{IntoResponse, Response}, RequestExt, RequestPartsExt, }; -use axum_extra::headers::authorization::Bearer; -use axum_extra::{headers::Authorization, typed_header::TypedHeaderRejectionReason, TypedHeader}; +use axum_extra::{ + headers::{authorization::Bearer, Authorization}, + typed_header::TypedHeaderRejectionReason, + TypedHeader, +}; use bytes::{BufMut, BytesMut}; use http::{Request, StatusCode}; use ruma::{ diff --git a/src/service/globals/mod.rs b/src/service/globals/mod.rs index fc695f86..c22ffef3 100644 --- a/src/service/globals/mod.rs +++ b/src/service/globals/mod.rs @@ -1,9 +1,9 @@ mod data; -pub use data::Data; -pub use data::SigningKeys; -use ruma::MilliSecondsSinceUnixEpoch; -use ruma::{serde::Base64, OwnedDeviceId, OwnedEventId, OwnedRoomId, OwnedServerName, OwnedUserId}; -use ruma::{OwnedRoomAliasId, RoomAliasId}; +pub use data::{Data, SigningKeys}; +use ruma::{ + serde::Base64, MilliSecondsSinceUnixEpoch, OwnedDeviceId, OwnedEventId, OwnedRoomAliasId, + OwnedRoomId, OwnedServerName, OwnedUserId, RoomAliasId, +}; use crate::api::server_server::FedDest; @@ -16,7 +16,6 @@ use ruma::{ api::{client::sync::sync_events, federation::discovery::ServerSigningKeys}, DeviceId, RoomVersionId, ServerName, UserId, }; -use std::str::FromStr; use std::{ collections::{BTreeMap, HashMap}, error::Error as StdError, @@ -25,6 +24,7 @@ use std::{ iter, net::{IpAddr, SocketAddr}, path::PathBuf, + str::FromStr, sync::{ atomic::{self, AtomicBool}, Arc, RwLock as StdRwLock,