From 1ff9b87cafeeeabe765ebbf22e98bacc374d52a3 Mon Sep 17 00:00:00 2001 From: LJ Date: Wed, 25 Sep 2024 00:01:14 +0300 Subject: [PATCH] Update to latest nightly rust formatting --- Cargo.toml | 4 ++-- rustfmt.toml | 2 +- src/api_client/http.rs | 6 +++--- src/model/message.rs | 2 +- src/model/record.rs | 2 +- src/model/sessions_info.rs | 2 +- src/model/stats.rs | 2 +- src/model/submission.rs | 2 +- src/model/user.rs | 2 +- src/model/user_session.rs | 2 +- src/util.rs | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2a285d5..66863f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,9 +52,9 @@ governor = { version = "0.6.3", optional = true } tokio = { version = "1.40.0", optional = true, features = ["macros"]} tokio-stream = { version = "0.1.16", optional = true} http = { version = "1.1.0", optional = true } -async-trait = { version = "0.1.82", optional = true } +async-trait = { version = "0.1.83", optional = true } # Required to be defined by us since ezsockets doesn't expose a TLS feature -tokio-tungstenite = {version = "0.23.1", optional= true, default-features = false, features = ["rustls-tls-webpki-roots"] } +tokio-tungstenite = {version = "0.24.0", optional= true, default-features = false, features = ["rustls-tls-webpki-roots"] } [dependencies.reqwest] optional = true diff --git a/rustfmt.toml b/rustfmt.toml index 28959ae..c237034 100755 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,4 +1,4 @@ -version = "Two" +style_edition = "2024" max_width = 80 use_small_heuristics = "Max" # Replace with the one below when rustfmt hits 2.0 #width_heuristics = "Max" diff --git a/src/api_client/http.rs b/src/api_client/http.rs index 71b5558..1618619 100644 --- a/src/api_client/http.rs +++ b/src/api_client/http.rs @@ -1,17 +1,17 @@ use std::num::NonZeroU32; use governor::{ + Quota, + RateLimiter, clock::DefaultClock, middleware::NoOpMiddleware, state::{InMemoryState, NotKeyed}, - Quota, - RateLimiter, }; pub use racal::reqwest::ApiClient; use reqwest::{ - header::{HeaderMap, HeaderValue}, Client, RequestBuilder, + header::{HeaderMap, HeaderValue}, }; use serde::{Deserialize, Serialize}; diff --git a/src/model/message.rs b/src/model/message.rs index 9411cd3..f709a6f 100644 --- a/src/model/message.rs +++ b/src/model/message.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use time::{serde::rfc3339, OffsetDateTime}; +use time::{OffsetDateTime, serde::rfc3339}; #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] diff --git a/src/model/record.rs b/src/model/record.rs index c8f654c..1a97711 100644 --- a/src/model/record.rs +++ b/src/model/record.rs @@ -1,7 +1,7 @@ use std::collections::HashSet; use serde::{Deserialize, Serialize}; -use time::{serde::rfc3339, OffsetDateTime}; +use time::{OffsetDateTime, serde::rfc3339}; #[serde_with::serde_as] #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] diff --git a/src/model/sessions_info.rs b/src/model/sessions_info.rs index bb4af1a..9c73489 100644 --- a/src/model/sessions_info.rs +++ b/src/model/sessions_info.rs @@ -1,4 +1,4 @@ -use time::{serde::rfc3339, OffsetDateTime}; +use time::{OffsetDateTime, serde::rfc3339}; use super::AssemblyInfo; diff --git a/src/model/stats.rs b/src/model/stats.rs index 2d36a6e..68d709a 100644 --- a/src/model/stats.rs +++ b/src/model/stats.rs @@ -1,8 +1,8 @@ use std::collections::HashMap; use serde::{Deserialize, Serialize}; -use time::serde::rfc3339; use time::OffsetDateTime; +use time::serde::rfc3339; use super::{SessionAccessLevel, UserSessionType}; diff --git a/src/model/submission.rs b/src/model/submission.rs index 6feff60..2adf739 100644 --- a/src/model/submission.rs +++ b/src/model/submission.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use time::{serde::rfc3339, OffsetDateTime}; +use time::{OffsetDateTime, serde::rfc3339}; #[derive(Debug, PartialEq, Eq, Hash, Clone, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] diff --git a/src/model/user.rs b/src/model/user.rs index 935ff05..1523c72 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use time::{serde::rfc3339, OffsetDateTime}; +use time::{OffsetDateTime, serde::rfc3339}; #[serde_with::serde_as] #[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)] diff --git a/src/model/user_session.rs b/src/model/user_session.rs index 19b2ddc..29f1833 100644 --- a/src/model/user_session.rs +++ b/src/model/user_session.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; use serde_with::serde_as; -use time::{serde::rfc3339, OffsetDateTime}; +use time::{OffsetDateTime, serde::rfc3339}; #[serde_as] #[derive(Clone, PartialEq, Eq, Hash, Deserialize, Serialize)] diff --git a/src/util.rs b/src/util.rs index fa5c799..8428aa8 100644 --- a/src/util.rs +++ b/src/util.rs @@ -4,7 +4,7 @@ pub mod opt_rfc3339 { //! Time serde for date time's RFC3339 where errors are converted to None. #![allow(clippy::unnecessary_wraps)] use serde::{Deserializer, Serializer}; - use time::{serde::rfc3339, OffsetDateTime}; + use time::{OffsetDateTime, serde::rfc3339}; /// Deserializes data into an offset date time, ignoring errors ///