Skip to content

Commit 465e105

Browse files
committed
add rustfmt.toml to avoid formatting PRs
1 parent cbe607e commit 465e105

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

.rustfmt.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
edition = "2024"
2+
newline_style = "Unix"
3+
tab_spaces = 2
4+
max_width = 130

httpsig-hyper/src/hyper_http_tests.rs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use super::{
22
super::{
3+
ContentDigestType,
34
error::HyperDigestError,
45
hyper_content_digest::{RequestContentDigest, ResponseContentDigest},
5-
ContentDigestType,
66
},
77
*,
88
};
@@ -601,13 +601,26 @@ async fn test_response_with_query_param_req_sign_verify() {
601601
.await
602602
.unwrap();
603603

604-
assert!(req.headers().get("signature-input").is_none(), "request should not be modified");
605-
assert!(res.headers().get("signature-input").is_some(), "signature-input header is missing on response");
606-
assert!(res.headers().get("signature").is_some(), "signature header is missing on response");
604+
assert!(
605+
req.headers().get("signature-input").is_none(),
606+
"request should not be modified"
607+
);
608+
assert!(
609+
res.headers().get("signature-input").is_some(),
610+
"signature-input header is missing on response"
611+
);
612+
assert!(
613+
res.headers().get("signature").is_some(),
614+
"signature header is missing on response"
615+
);
607616

608617
let public_key = PublicKey::from_pem(&AlgorithmName::Ed25519, EDDSA_PUBLIC_KEY).unwrap();
609618
let verification_res = res.verify_message_signature(&public_key, None, Some(&req)).await;
610-
assert!(verification_res.is_ok(), "signature verification failed: {:?}", verification_res.err());
619+
assert!(
620+
verification_res.is_ok(),
621+
"signature verification failed: {:?}",
622+
verification_res.err()
623+
);
611624
}
612625

613626
// ---- RFC 9421: Response must reject request-derived components without `req` ----

0 commit comments

Comments
 (0)