From 60b35381b3437c4eca80e4338e75d9f454dd150f Mon Sep 17 00:00:00 2001 From: Jiayi Zhao Date: Wed, 20 Feb 2019 20:56:36 -0500 Subject: remove dyn for Box --- config/joshuto.toml | 1 + src/commands/mod.rs | 4 ++-- src/config/keymap.rs | 2 +- src/run.rs | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/joshuto.toml b/config/joshuto.toml index ec6c8b4..4c5c6c5 100644 --- a/config/joshuto.toml +++ b/config/joshuto.toml @@ -9,6 +9,7 @@ column_ratio = [1, 3, 4] scroll_offset = 6 sort_type = "natural" + [sort_option] show_hidden = false case_sensitive = false diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 9130cac..09fbfb7 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -44,7 +44,7 @@ use crate::structs; #[derive(Debug)] pub enum CommandKeybind { - SimpleKeybind(Box), + SimpleKeybind(Box), CompositeKeybind(HashMap), } @@ -69,7 +69,7 @@ pub struct ProgressInfo { pub total_bytes: u64, } -pub fn from_args(command: &str, args: Option<&Vec>) -> Option> { +pub fn from_args(command: &str, args: Option<&Vec>) -> Option> { match command { "cd" => { if let Some(args) = args { diff --git a/src/config/keymap.rs b/src/config/keymap.rs index eb0c81c..6b4a1f1 100644 --- a/src/config/keymap.rs +++ b/src/config/keymap.rs @@ -63,7 +63,7 @@ impl JoshutoKeymap { fn insert_keycommand( map: &mut HashMap, - keycommand: Box, + keycommand: Box, keys: &[String], ) { if keys.len() == 1 { diff --git a/src/run.rs b/src/run.rs index 7c86e0e..d5a6cad 100644 --- a/src/run.rs +++ b/src/run.rs @@ -11,7 +11,7 @@ use crate::window::JoshutoPanel; fn recurse_get_keycommand( keymap: &HashMap, -) -> Option<&Box> { +) -> Option<&Box> { let (term_rows, term_cols) = ui::getmaxyx(); ncurses::timeout(-1); @@ -176,7 +176,7 @@ pub fn run(config_t: config::JoshutoConfig, keymap_t: config::JoshutoKeymap) { continue; } - let keycommand: &Box; + let keycommand: &Box; match keymap_t.keymaps.get(&ch) { Some(CommandKeybind::CompositeKeybind(m)) => match recurse_get_keycommand(&m) { -- cgit v1.2.3