Skip to content

Commit 09bf303

Browse files
committed
controllers/user/session: Simplify imports
1 parent edcf8ab commit 09bf303

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/controllers/user/session.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use axum::extract::{FromRequestParts, Query};
22
use axum::Json;
33
use axum_extra::json;
44
use axum_extra::response::ErasedJson;
5-
use diesel::QueryResult;
6-
use diesel_async::AsyncPgConnection;
5+
use diesel::prelude::*;
6+
use diesel_async::{AsyncPgConnection, RunQueryDsl};
77
use http::request::Parts;
88
use oauth2::reqwest::async_http_client;
99
use oauth2::{AuthorizationCode, CsrfToken, Scope, TokenResponse};
@@ -151,9 +151,6 @@ async fn save_user_to_database(
151151
}
152152

153153
async fn find_user_by_gh_id(conn: &mut AsyncPgConnection, gh_id: i32) -> QueryResult<Option<User>> {
154-
use diesel::prelude::*;
155-
use diesel_async::RunQueryDsl;
156-
157154
users::table
158155
.filter(users::gh_id.eq(gh_id))
159156
.first(conn)

0 commit comments

Comments
 (0)