Skip to content

Commit 6ecda68

Browse files
committed
use nested imports on backend and wire
1 parent 234539e commit 6ecda68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+720
-407
lines changed

backend/auth/src/banned_set.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
use std::collections::HashSet;
2-
use std::sync::RwLock;
1+
use std::{
2+
collections::HashSet,
3+
sync::RwLock
4+
};
35

46
use identifiers::user::UserUuid;
57

backend/auth/src/jwt.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
use frank_jwt::{Algorithm, encode, decode};
1+
use frank_jwt::{
2+
Algorithm,
3+
encode,
4+
decode
5+
};
26
use serde_json;
37
use Secret;
48
use error::JwtError;

backend/auth/src/lib.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ mod banned_set;
3333
mod secret;
3434

3535

36-
#[cfg(feature = "rocket_support")]
37-
pub use jwt::user_authorization;
38-
pub use jwt::ServerJwt;
39-
pub use password::{hash_password, verify_hash};
36+
pub use jwt::{
37+
user_authorization,
38+
ServerJwt
39+
};
40+
pub use password::{
41+
hash_password,
42+
verify_hash
43+
};
4044
pub use banned_set::BannedSet;
4145
pub use secret::Secret;
4246

backend/auth/src/secret.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
use rand;
2-
use rand::{Rng};
1+
use rand::{
2+
self,
3+
Rng
4+
};
35

46
/// The secret contains a random string that is generated at startup.
57
/// This will be different every time the server restarts.

backend/auth/src/test.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
use super::*;
2-
use wire::user::UserRole;
2+
use wire::{
3+
user::{
4+
UserRole,
5+
Jwt
6+
}
7+
};
38
use chrono::Utc;
49

5-
use wire::user::Jwt;
6-
710
//use log::{info, warn};
811
use identifiers::user::UserUuid;
912

backend/db/src/calls/article.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::{
66
};
77
use diesel::{
88
RunQueryDsl,
9-
diesel,
9+
self,
1010
QueryDsl,
1111
ExpressionMethods,
1212
BelongingToDsl,

backend/db/src/calls/bucket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{
88
use error::BackendResult;
99
use diesel::{
1010
prelude::*,
11-
diesel
11+
self
1212
};
1313
use chrono::{
1414
NaiveDateTime,

backend/db/src/calls/chat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{
88
use diesel::{
99
QueryDsl,
1010
RunQueryDsl,
11-
diesel,
11+
self,
1212
ExpressionMethods,
1313
PgConnection
1414
};

backend/db/src/calls/post.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{
33
post_upvotes,
44
posts,
55
post_downvotes,
6-
schema
6+
self
77
},
88
user::User,
99
thread::Thread,
@@ -13,7 +13,7 @@ use chrono::NaiveDateTime;
1313
use error::*;
1414
use diesel::{
1515
RunQueryDsl,
16-
diesel,
16+
self,
1717
ExpressionMethods,
1818
BelongingToDsl,
1919
QueryDsl,

backend/db/src/calls/question.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use diesel::{
33
QueryDsl,
44
BelongingToDsl,
55
GroupedBy,
6-
diesel,
6+
self,
77
ExpressionMethods,
88
PgConnection
99
};

0 commit comments

Comments
 (0)