Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuhvi committed Oct 7, 2024
1 parent c001c96 commit affd589
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
19 changes: 8 additions & 11 deletions pubky-homeserver/src/routes/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,13 @@ mod tests {

#[test]
fn test_is_secure() {
assert_eq!(is_secure(""), false);
assert_eq!(is_secure("127.0.0.1"), false);
assert_eq!(is_secure("167.86.102.121"), false);
assert_eq!(
is_secure("[2001:0db8:0000:0000:0000:ff00:0042:8329]"),
false
);
assert_eq!(is_secure("localhost"), false);
assert_eq!(is_secure("localhost:23423"), false);
assert_eq!(is_secure(&Keypair::random().public_key().to_string()), true);
assert_eq!(is_secure("example.com"), true);
assert!(!is_secure(""));
assert!(!is_secure("127.0.0.1"));
assert!(!is_secure("167.86.102.121"));
assert!(!is_secure("[2001:0db8:0000:0000:0000:ff00:0042:8329]"));
assert!(!is_secure("localhost"));
assert!(!is_secure("localhost:23423"));
assert!(is_secure(&Keypair::random().public_key().to_string()));
assert!(is_secure("example.com"));
}
}
5 changes: 1 addition & 4 deletions pubky/src/shared/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,7 @@ mod tests {
let feed_url = format!("http://localhost:{}/events/", homeserver.port());

let response = client
.request(
Method::GET,
format!("{feed_url}").as_str().try_into().unwrap(),
)
.request(Method::GET, feed_url.as_str().try_into().unwrap())
.send()
.await
.unwrap();
Expand Down

0 comments on commit affd589

Please sign in to comment.