♻️ refactor: use `use X as Y`
parent
066c95dc07
commit
47788f56e0
|
@ -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 <Response, FileServerError>
|
||||
{
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue