Skip to content

Commit

Permalink
fix: cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuhvi committed Jul 26, 2024
1 parent cdfd6c3 commit ac96c85
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pubky-common/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ mod tests {
let mut invalid = authn_signature.as_bytes().to_vec();
invalid[64..].copy_from_slice(&[0; 32]);

assert!(!verifier.verify(&invalid, &signer).is_ok())
assert!(verifier.verify(&invalid, &signer).is_err())
}

{
// Invalid signer
let mut invalid = authn_signature.as_bytes().to_vec();
invalid[0..32].copy_from_slice(&[0; 32]);

assert!(!verifier.verify(&invalid, &signer).is_ok())
assert!(verifier.verify(&invalid, &signer).is_err())
}
}
}
2 changes: 1 addition & 1 deletion pubky-common/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ mod tests {

#[test]
fn serialize() {
let mut session = Session::default();
let mut session = Session::new();

session.user_agent = "foo".to_string();

Expand Down
2 changes: 1 addition & 1 deletion pubky/src/client/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ mod tests {

match session {
Err(Error::NotSignedIn) => {}
_ => assert!(false, "expected NotSignedInt error"),
_ => panic!("expected NotSignedInt error"),
}
}

Expand Down
4 changes: 1 addition & 3 deletions pubky/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ if_not_wasm! {
mod client;
mod client_async;

use pkarr::{PkarrClient};
use ureq::{Agent, Response};
use url::Url;
use client::PubkyClient;
}

if_wasm! {
Expand Down

0 comments on commit ac96c85

Please sign in to comment.