diff --git a/ee/tabby-webserver/src/service/auth.rs b/ee/tabby-webserver/src/service/auth.rs index e6d3e5356ae9..9e685c04fab7 100644 --- a/ee/tabby-webserver/src/service/auth.rs +++ b/ee/tabby-webserver/src/service/auth.rs @@ -151,7 +151,8 @@ impl AuthenticationService for DbConn { let pwd_hash = password_hash(&input.password1)?; - let id = self.create_user(input.email.clone(), pwd_hash, !is_admin_initialized) + let id = self + .create_user(input.email.clone(), pwd_hash, !is_admin_initialized) .await?; let user = self.get_user(id).await?.unwrap(); diff --git a/ee/tabby-webserver/src/service/db.rs b/ee/tabby-webserver/src/service/db.rs index aa884248b6e4..963b392ae88f 100644 --- a/ee/tabby-webserver/src/service/db.rs +++ b/ee/tabby-webserver/src/service/db.rs @@ -171,7 +171,9 @@ impl DbConn { let res = self .conn .call(move |c| { - let mut stmt = c.prepare(r#"INSERT INTO users (email, password_encrypted, is_admin) VALUES (?, ?, ?)"#)?; + let mut stmt = c.prepare( + r#"INSERT INTO users (email, password_encrypted, is_admin) VALUES (?, ?, ?)"#, + )?; let id = stmt.insert((email, password_encrypted, is_admin))?; Ok(id) }) @@ -187,12 +189,8 @@ impl DbConn { let user = self .conn .call(move |c| { - c.query_row( - User::select("id = ?").as_str(), - params![id], - User::from_row, - ) - .optional() + c.query_row(User::select("id = ?").as_str(), params![id], User::from_row) + .optional() }) .await?;