···404404 .map_err(|_| DpopTokenEndpointError::InvalidProof("DPoP header JSON malformed"))?;
405405406406 if dpop_header.typ != "dpop+jwt" {
407407- return Err(DpopTokenEndpointError::InvalidProof("DPoP typ must be dpop+jwt"));
407407+ return Err(DpopTokenEndpointError::InvalidProof(
408408+ "DPoP typ must be dpop+jwt",
409409+ ));
408410 }
409411410412 // Verify the signature against the embedded JWK.
+22-6
crates/relay/src/db/oauth.rs
···457457 .unwrap()
458458 .expect("code should be found");
459459460460- assert_eq!(row.client_id, "https://app.example.com/client-metadata.json");
460460+ assert_eq!(
461461+ row.client_id,
462462+ "https://app.example.com/client-metadata.json"
463463+ );
461464 assert_eq!(row.did, "did:plc:testaccount000000000000");
462465463466 // Second consume: must return None (already deleted).
464464- let second = consume_authorization_code(&pool, "hash-abc123").await.unwrap();
465465- assert!(second.is_none(), "consumed code must not be found again (AC1.6)");
467467+ let second = consume_authorization_code(&pool, "hash-abc123")
468468+ .await
469469+ .unwrap();
470470+ assert!(
471471+ second.is_none(),
472472+ "consumed code must not be found again (AC1.6)"
473473+ );
466474 }
467475468476 #[tokio::test]
469477 async fn consume_authorization_code_returns_none_for_unknown_code() {
470478 let pool = test_pool().await;
471471- let result = consume_authorization_code(&pool, "nonexistent-hash").await.unwrap();
479479+ let result = consume_authorization_code(&pool, "nonexistent-hash")
480480+ .await
481481+ .unwrap();
472482 assert!(result.is_none());
473483 }
474484···511521 let result = consume_authorization_code(&pool, "expired-code-hash")
512522 .await
513523 .unwrap();
514514- assert!(result.is_none(), "expired auth code must return None (AC1.5)");
524524+ assert!(
525525+ result.is_none(),
526526+ "expired auth code must return None (AC1.5)"
527527+ );
515528 }
516529517530 #[tokio::test]
···545558546559 let (id, scope, jkt) = row.expect("refresh token row must exist");
547560 assert_eq!(id, "refresh-token-hash-01");
548548- assert_eq!(scope, "com.atproto.refresh", "scope must be com.atproto.refresh (AC1.3)");
561561+ assert_eq!(
562562+ scope, "com.atproto.refresh",
563563+ "scope must be com.atproto.refresh (AC1.3)"
564564+ );
549565 assert_eq!(jkt.as_deref(), Some("jkt-thumbprint"));
550566 }
551567}