From f7b303bd1985cdad111da9aa27f1f164acbb797c Mon Sep 17 00:00:00 2001 From: boasting-squirrel Date: Tue, 12 Feb 2019 20:31:08 +0100 Subject: Fixed Clippy warnings --- src/config.rs | 4 ++-- src/listing.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/config.rs b/src/config.rs index 4873fff..4c345ba 100644 --- a/src/config.rs +++ b/src/config.rs @@ -23,7 +23,7 @@ pub 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.clone(); + let sort_method = app.state().sort_method; let reverse_sort = app.state().reverse_sort; if path.is_file() { None @@ -38,7 +38,7 @@ pub fn configure_app(app: App) -> App { req, no_symlinks, random_route.clone(), - sort_method.clone(), + sort_method, reverse_sort, ) }), diff --git a/src/listing.rs b/src/listing.rs index 7a13e9b..c955191 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -10,7 +10,7 @@ use std::str::FromStr; use crate::config; -#[derive(Clone, Debug)] +#[derive(Clone, Copy, Debug)] pub enum SortingMethods { Natural, Alpha, -- cgit v1.2.3