From 71c1ac0fab1209a6f453869a594e65a2929b6d7b Mon Sep 17 00:00:00 2001 From: Emi Tatsuo Date: Mon, 23 Nov 2020 08:44:45 -0500 Subject: [PATCH] Fix `serve_dir` feature --- src/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.rs b/src/util.rs index 5c623aa..99cb65c 100644 --- a/src/util.rs +++ b/src/util.rs @@ -28,7 +28,7 @@ pub async fn serve_file>(path: P, mime: &Mime) -> Result, B: AsRef>(path: P, virtual_path )); } - Ok(Response::document(document)) + Ok(document.into()) } #[cfg(feature="serve_dir")]