♻️ refactor: use `use X as Y`

main
_ 2020-12-20 18:40:49 +00:00
parent 066c95dc07
commit 47788f56e0
1 changed files with 6 additions and 2 deletions

View File

@ -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,