diff --git a/pubky-common/src/auth.rs b/pubky-common/src/auth.rs index 7fc2a02..5d5ebba 100644 --- a/pubky-common/src/auth.rs +++ b/pubky-common/src/auth.rs @@ -206,7 +206,7 @@ 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()) } { @@ -214,7 +214,7 @@ mod tests { 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()) } } } diff --git a/pubky-common/src/session.rs b/pubky-common/src/session.rs index 9ef3c9d..459f048 100644 --- a/pubky-common/src/session.rs +++ b/pubky-common/src/session.rs @@ -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(); diff --git a/pubky/src/client/auth.rs b/pubky/src/client/auth.rs index a9f3da1..b1f4cc8 100644 --- a/pubky/src/client/auth.rs +++ b/pubky/src/client/auth.rs @@ -112,7 +112,7 @@ mod tests { match session { Err(Error::NotSignedIn) => {} - _ => assert!(false, "expected NotSignedInt error"), + _ => panic!("expected NotSignedInt error"), } } diff --git a/pubky/src/lib.rs b/pubky/src/lib.rs index 87c535d..fab446f 100644 --- a/pubky/src/lib.rs +++ b/pubky/src/lib.rs @@ -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! {