From 5625f349e38c2c4fff9e9b0992a295ea6594fbeb Mon Sep 17 00:00:00 2001 From: Brad Dunbar Date: Thu, 20 Nov 2025 12:33:37 -0500 Subject: [PATCH] Fix example path params Resolves the following error: thread 'main' (6023907) panicked at examples/live_federation/main.rs:58:10: Path segments must not start with `:`. For capture groups, use `{capture}`. If you meant to literally match a segment starting with a colon, call `without_v07_checks` on the router. --- examples/live_federation/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/live_federation/main.rs b/examples/live_federation/main.rs index dc593b1..5567fcb 100644 --- a/examples/live_federation/main.rs +++ b/examples/live_federation/main.rs @@ -55,8 +55,8 @@ async fn main() -> Result<(), Error> { info!("Listen with HTTP server on {BIND_ADDRESS}"); let config = config.clone(); let app = Router::new() - .route("/:user", get(http_get_user)) - .route("/:user/inbox", post(http_post_user_inbox)) + .route("/{user}", get(http_get_user)) + .route("/{user}/inbox", post(http_post_user_inbox)) .route("/.well-known/webfinger", get(webfinger)) .layer(FederationMiddleware::new(config));