Fix serve_dir feature

This commit is contained in:
Emi Tatsuo 2020-11-23 08:44:45 -05:00
parent 5254c17e36
commit 71c1ac0fab
Signed by: Emi
GPG key ID: 68FAB2E2E6DFC98B

View file

@ -28,7 +28,7 @@ pub async fn serve_file<P: AsRef<Path>>(path: P, mime: &Mime) -> Result<Response
}
};
Ok(Response::success_with_body(mime, file))
Ok(Response::success(mime, file))
}
#[cfg(feature="serve_dir")]
@ -93,7 +93,7 @@ async fn serve_dir_listing<P: AsRef<Path>, B: AsRef<Path>>(path: P, virtual_path
));
}
Ok(Response::document(document))
Ok(document.into())
}
#[cfg(feature="serve_dir")]