diff options
author | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-02-25 19:22:58 +0000 |
---|---|---|
committer | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-02-25 19:22:58 +0000 |
commit | 6e95f942f1ae6c9c120c95eeb8b1aae1379bcd54 (patch) | |
tree | f7f742418ebc0b64a821a5204abe5889343ab751 /src/main.rs | |
parent | Use rust nightly (diff) | |
download | miniserve-6e95f942f1ae6c9c120c95eeb8b1aae1379bcd54.tar.gz miniserve-6e95f942f1ae6c9c120c95eeb8b1aae1379bcd54.zip |
Removed sorting from CLI + added sorting from HTML
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 17 |
1 files changed, 1 insertions, 16 deletions
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<String>, - - /// 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<MiniserveConfig>) -> App<MiniserveConfig> { 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<MiniserveConfig>) -> App<MiniserveConfig> { .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()) }), ) } |