From 203da23cf2237b58d2d3c87fa9e2af0c597898b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Gali=C4=87?= Date: Fri, 12 Jul 2019 22:48:03 +0200 Subject: [PATCH] follow up on @fdb-hiroshima & @BaptisteGelez review --- src/routes/posts.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/posts.rs b/src/routes/posts.rs index 45420785..f8ecc1c2 100644 --- a/src/routes/posts.rs +++ b/src/routes/posts.rs @@ -144,14 +144,14 @@ pub fn details( match (blog.custom_domain, responding_to) { (Some(ref custom_domain), Some(ref responding_to)) => Ok(Redirect::to(format!( - "https://{}/?responding_to={}", - custom_domain, responding_to + "https://{}/{}?responding_to={}", + custom_domain, slug, responding_to )) .into()), (Some(ref custom_domain), _) => { - Ok(Redirect::to(format!("https://{}/", custom_domain)).into()) + Ok(Redirect::to(format!("https://{}/{}", custom_domain, slug)).into()) } - (None, _) => panic!("This code path should have already been handled!"), + (None, _) => unreachable!("This code path should have already been handled!"), } }