From 6e95f942f1ae6c9c120c95eeb8b1aae1379bcd54 Mon Sep 17 00:00:00 2001 From: boasting-squirrel Date: Mon, 25 Feb 2019 20:22:58 +0100 Subject: Removed sorting from CLI + added sorting from HTML --- src/main.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e9b16df..37392e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,12 +40,6 @@ pub struct MiniserveConfig { /// Enable random route generation pub random_route: Option, - - /// Sort files/directories - pub sort_method: listing::SortingMethods, - - /// Enable inverse sorting - pub reverse_sort: bool, } fn main() { @@ -181,8 +175,6 @@ fn configure_app(app: App) -> App { let path = &app.state().path; let no_symlinks = app.state().no_symlinks; let random_route = app.state().random_route.clone(); - let sort_method = app.state().sort_method; - let reverse_sort = app.state().reverse_sort; if path.is_file() { None } else { @@ -191,14 +183,7 @@ fn configure_app(app: App) -> App { .expect("Couldn't create path") .show_files_listing() .files_listing_renderer(move |dir, req| { - listing::directory_listing( - dir, - req, - no_symlinks, - random_route.clone(), - sort_method, - reverse_sort, - ) + listing::directory_listing(dir, req, no_symlinks, random_route.clone()) }), ) } -- cgit v1.2.3