An easy-to-host PDS on the ATProtocol, MacOS. Grandma-approved.

style: reformat code with cargo fmt

+25 -7
+3 -1
crates/relay/src/auth/mod.rs
··· 404 404 .map_err(|_| DpopTokenEndpointError::InvalidProof("DPoP header JSON malformed"))?; 405 405 406 406 if dpop_header.typ != "dpop+jwt" { 407 - return Err(DpopTokenEndpointError::InvalidProof("DPoP typ must be dpop+jwt")); 407 + return Err(DpopTokenEndpointError::InvalidProof( 408 + "DPoP typ must be dpop+jwt", 409 + )); 408 410 } 409 411 410 412 // Verify the signature against the embedded JWK.
+22 -6
crates/relay/src/db/oauth.rs
··· 457 457 .unwrap() 458 458 .expect("code should be found"); 459 459 460 - assert_eq!(row.client_id, "https://app.example.com/client-metadata.json"); 460 + assert_eq!( 461 + row.client_id, 462 + "https://app.example.com/client-metadata.json" 463 + ); 461 464 assert_eq!(row.did, "did:plc:testaccount000000000000"); 462 465 463 466 // Second consume: must return None (already deleted). 464 - let second = consume_authorization_code(&pool, "hash-abc123").await.unwrap(); 465 - assert!(second.is_none(), "consumed code must not be found again (AC1.6)"); 467 + let second = consume_authorization_code(&pool, "hash-abc123") 468 + .await 469 + .unwrap(); 470 + assert!( 471 + second.is_none(), 472 + "consumed code must not be found again (AC1.6)" 473 + ); 466 474 } 467 475 468 476 #[tokio::test] 469 477 async fn consume_authorization_code_returns_none_for_unknown_code() { 470 478 let pool = test_pool().await; 471 - let result = consume_authorization_code(&pool, "nonexistent-hash").await.unwrap(); 479 + let result = consume_authorization_code(&pool, "nonexistent-hash") 480 + .await 481 + .unwrap(); 472 482 assert!(result.is_none()); 473 483 } 474 484 ··· 511 521 let result = consume_authorization_code(&pool, "expired-code-hash") 512 522 .await 513 523 .unwrap(); 514 - assert!(result.is_none(), "expired auth code must return None (AC1.5)"); 524 + assert!( 525 + result.is_none(), 526 + "expired auth code must return None (AC1.5)" 527 + ); 515 528 } 516 529 517 530 #[tokio::test] ··· 545 558 546 559 let (id, scope, jkt) = row.expect("refresh token row must exist"); 547 560 assert_eq!(id, "refresh-token-hash-01"); 548 - assert_eq!(scope, "com.atproto.refresh", "scope must be com.atproto.refresh (AC1.3)"); 561 + assert_eq!( 562 + scope, "com.atproto.refresh", 563 + "scope must be com.atproto.refresh (AC1.3)" 564 + ); 549 565 assert_eq!(jkt.as_deref(), Some("jkt-thumbprint")); 550 566 } 551 567 }