summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/api/auth/oauth.rs2
-rw-r--r--src/api/profile/mod.rs2
-rw-r--r--src/db/mod.rs4
-rw-r--r--src/lib.rs4
4 files changed, 8 insertions, 4 deletions
diff --git a/src/api/auth/oauth.rs b/src/api/auth/oauth.rs
index 39fe6ae..cb53b7c 100644
--- a/src/api/auth/oauth.rs
+++ b/src/api/auth/oauth.rs
@@ -7,8 +7,8 @@ use serde_json::Value;
use sha2::Digest;
use subtle::ConstantTimeEq;
-use crate::api::{EMPTY, Empty};
use crate::api::auth::WithVerifiedFxaLogin;
+use crate::api::{Empty, EMPTY};
use crate::db::DbConn;
use crate::types::oauth::{Scope, ScopeSet};
use crate::{
diff --git a/src/api/profile/mod.rs b/src/api/profile/mod.rs
index da9c87f..9abb872 100644
--- a/src/api/profile/mod.rs
+++ b/src/api/profile/mod.rs
@@ -15,7 +15,7 @@ use Either::{Left, Right};
use crate::{
api::Empty,
- auth::{Authenticated, WithBearer, AuthenticatedRequest},
+ auth::{Authenticated, AuthenticatedRequest, WithBearer},
cache::Immutable,
db::Db,
types::{oauth::Scope, UserID},
diff --git a/src/db/mod.rs b/src/db/mod.rs
index fa2b62f..bceab43 100644
--- a/src/db/mod.rs
+++ b/src/db/mod.rs
@@ -562,7 +562,9 @@ impl DbConn {
pub(crate) async fn delete_oauth_token(&self, id: &OauthTokenID) -> sqlx::Result<bool> {
Ok(query!(r#"delete from oauth_token where id = $1"#, id as _)
.execute(&mut self.get().await?.tx)
- .await?.rows_affected() > 0)
+ .await?
+ .rows_affected()
+ > 0)
}
pub(crate) async fn delete_refresh_token(&self, id: &OauthTokenID) -> sqlx::Result<()> {
diff --git a/src/lib.rs b/src/lib.rs
index 75232ee..47c9a7d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -203,7 +203,9 @@ async fn ensure_invite_admin(db: &Db, cfg: &Config) -> anyhow::Result<()> {
}
}
-pub async fn build(base: rocket::Rocket<rocket::Build>) -> anyhow::Result<rocket::Rocket<rocket::Build>> {
+pub async fn build(
+ base: rocket::Rocket<rocket::Build>,
+) -> anyhow::Result<rocket::Rocket<rocket::Build>> {
let config = base.figment().extract::<Config>().context("reading config")?;
let db = Arc::new(Db::connect(&config.database_url).await.unwrap());