diff --git a/crates/ptth_server/src/file_server/html.rs b/crates/ptth_server/src/file_server/html.rs index 498b3d2..325cb30 100644 --- a/crates/ptth_server/src/file_server/html.rs +++ b/crates/ptth_server/src/file_server/html.rs @@ -3,6 +3,10 @@ use std::borrow::Cow; use handlebars::Handlebars; use serde::Serialize; use tracing::instrument; +use tokio::fs::{ + DirEntry as FsDirEntry, + ReadDir as FsReadDir, +}; use super::{ FileServerError, @@ -56,7 +60,7 @@ pub async fn serve_dir ( handlebars: &Handlebars <'static>, instance_metrics: &metrics::Startup, path: Cow <'_, str>, - mut dir: tokio::fs::ReadDir + mut dir: FsReadDir ) -> Result { let mut entries = vec! []; @@ -76,7 +80,7 @@ pub async fn serve_dir ( Ok (serve_html (s)) } -async fn read_dir_entry (entry: tokio::fs::DirEntry) -> DirEntry +async fn read_dir_entry (entry: FsDirEntry) -> DirEntry { use percent_encoding::{ CONTROLS,