Skip to content

Commit 85f8336

Browse files
Merged in branch 01-hotfix
commit 50a2682 Author: Rogerio Oliveira <[email protected]> Date: Tue Apr 11 00:24:02 2023 +0200 removed some pub modifiers from internal functions; fixed the warn on "impl Reply" [rust-lang/rust#107729]; Changes to be committed: modified: mock-server/src/lib.rs modified: src/lib.rs modified: src/routes/authentication.rs
1 parent 1f5f12c commit 85f8336

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

mock-server/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl MockServer {
5454
}
5555
}
5656

57-
fn build_routes(&self) -> impl Filter<Extract = impl Reply> + Clone {
57+
fn build_routes(&self) -> impl Filter<Extract = (impl Reply,)> + Clone {
5858
warp::post()
5959
.and(warp::path("bad_words"))
6060
.and(warp::query())

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct OneshotHandler {
1616
pub sender: Sender<i32>,
1717
}
1818

19-
async fn build_routes(store: store::Store) -> impl Filter<Extract = impl Reply> + Clone {
19+
async fn build_routes(store: store::Store) -> impl Filter<Extract = (impl Reply,)> + Clone {
2020
let store_filter = warp::any().map(move || store.clone());
2121

2222
let cors = warp::cors()

src/routes/authentication.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub async fn register(store: Store, account: Account) -> Result<impl warp::Reply
2424
}
2525
}
2626

27-
pub fn hash_password(password: &[u8]) -> String {
27+
fn hash_password(password: &[u8]) -> String {
2828
let salt = rand::thread_rng().gen::<[u8; 32]>();
2929
let config = Config::default();
3030
argon2::hash_encoded(password, &salt, &config).unwrap()
@@ -66,7 +66,7 @@ fn issue_token(account_id: AccountId) -> String {
6666
.expect("Failed to construct paseto token w/ builder!")
6767
}
6868

69-
pub fn verify_token(token: String) -> Result<Session, Error> {
69+
fn verify_token(token: String) -> Result<Session, Error> {
7070
let key = env::var("PASETO_KEY").unwrap();
7171
let token = paseto::tokens::validate_local_token(
7272
&token,

0 commit comments

Comments
 (0)