From 8fe959967e55c1bf3cb653da064585e9972e0e0f Mon Sep 17 00:00:00 2001 From: emilis Date: Sun, 11 Sep 2022 16:56:49 +0100 Subject: [PATCH] unfucked not found errors --- src/servek/html.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/servek/html.rs b/src/servek/html.rs index f923dc2..55b4c0d 100644 --- a/src/servek/html.rs +++ b/src/servek/html.rs @@ -30,18 +30,17 @@ impl Server { warp::path!("@" / String) .and(Self::with_server(self.clone())) .and_then(|username: String, srv: Server| async move { - match srv - .hb + srv.hb .render( "profile", - &serde_json::json!(srv.profiler.profile(username).await?), + &serde_json::json!(srv + .profiler + .profile(username) + .await + .map_err(|e| ServerError::from(e))?), ) .map(|html| warp::reply::html(html)) .map_err(|e| ServerError::from(e).reject_self()) - { - Ok(resp) => Ok(resp), - Err(err) => Err(err), - } }), ) }