diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2019-03-06 22:53:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 22:53:27 +0000 |
commit | 6340e9e5658a1a4549ce7ceafd9a17dc4f2db057 (patch) | |
tree | c1e358530fa26fce611905e2211dc6fd122fcc65 /src/main.rs | |
parent | Comment some stuff (diff) | |
parent | Refactored if/let for sorting methods (diff) | |
download | miniserve-6340e9e5658a1a4549ce7ceafd9a17dc4f2db057.tar.gz miniserve-6340e9e5658a1a4549ce7ceafd9a17dc4f2db057.zip |
Merge pull request #44 from boastful-squirrel/header-sorting
Removed sorting from CLI + added sorting from HTML
Diffstat (limited to '')
-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 f00fb89..b15088c 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()) }), ) } |