From 2acf037d79d08681651851d6df7604eb288e21a7 Mon Sep 17 00:00:00 2001 From: Brad Dunbar Date: Fri, 21 Nov 2025 04:03:20 -0500 Subject: [PATCH] Fix example path params (#153) 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));