Skip to content

Commit

Permalink
Update formatting to latest nightly rust
Browse files Browse the repository at this point in the history
  • Loading branch information
LJ authored and LJ committed Sep 24, 2024
1 parent b302a89 commit 8254197
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 4 additions & 4 deletions src/api_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
use std::num::NonZeroU32;

use governor::{
Quota,
RateLimiter,
clock::DefaultClock,
middleware::NoOpMiddleware,
state::{InMemoryState, NotKeyed},
Quota,
RateLimiter,
};
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
use percent_encoding::{NON_ALPHANUMERIC, utf8_percent_encode};
pub use racal::reqwest::{ApiClient, ApiError};
use racal::{FromApiState, Queryable};
use reqwest::{header::HeaderMap, Client, RequestBuilder, Response};
use reqwest::{Client, RequestBuilder, Response, header::HeaderMap};
use serde::de::DeserializeOwned;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion src/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use std::fmt;

use serde::{de::Visitor, Deserialize, Deserializer, Serialize, Serializer};
use serde::{Deserialize, Deserializer, Serialize, Serializer, de::Visitor};

// TODO: serialization & deserilization customizations

Expand Down
2 changes: 1 addition & 1 deletion src/model/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use serde::{Deserialize, Serialize};
use strum::AsRefStr;
use time::{serde::rfc3339, OffsetDateTime};
use time::{OffsetDateTime, serde::rfc3339};
use url::Url;

/// If a world has been released publicly for example
Expand Down
2 changes: 1 addition & 1 deletion src/model/groups.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use either::Either;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use time::{serde::rfc3339, OffsetDateTime};
use time::{OffsetDateTime, serde::rfc3339};

use crate::id;

Expand Down
2 changes: 1 addition & 1 deletion src/model/users.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use either::Either;
use serde::{Deserialize, Serialize};
use time::{serde::rfc3339, OffsetDateTime};
use time::{OffsetDateTime, serde::rfc3339};
use url::Url;

use crate::id::{OfflineOr, OfflineOrPrivateOr};
Expand Down
11 changes: 4 additions & 7 deletions src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,10 @@ impl std::fmt::Debug for Authentication {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Authentication")
.field("token", &"*****")
.field(
"second_factor_token",
match &self.second_factor_token {
Some(_) => &"Some(*****)",
None => &"None",
},
)
.field("second_factor_token", match &self.second_factor_token {
Some(_) => &"Some(*****)",
None => &"None",
})
.finish()
}
}
Expand Down

0 comments on commit 8254197

Please sign in to comment.