summaryrefslogtreecommitdiffstats
path: root/src/commands/open_file.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-16 21:02:35 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-16 21:02:35 -0400
commita0286692964d120ee8a6ea36fbfb2f577dc2305c (patch)
tree453f2dbecd19f5d68d421f18c9e9f6b91bf1d96f /src/commands/open_file.rs
parent1475597b83fa0afbb6ddec979f6a8030a8c64db9 (diff)
cargo clippy
Diffstat (limited to 'src/commands/open_file.rs')
-rw-r--r--src/commands/open_file.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs
index c871c29..5d1e7de 100644
--- a/src/commands/open_file.rs
+++ b/src/commands/open_file.rs
@@ -53,7 +53,7 @@ impl OpenFile {
LoadChild::load_child(context)?;
} else if let Some(paths) = filepaths {
let options = Self::get_options(paths[0]);
- if options.len() > 0 {
+ if !options.is_empty() {
backend.terminal_drop();
let res = options[0].execute_with(&paths);
backend.terminal_restore()?;
@@ -97,7 +97,7 @@ impl OpenFileWith {
backend: &mut TuiBackend,
paths: &[&PathBuf],
) -> std::io::Result<()> {
- const PROMPT: &'static str = "open_with ";
+ const PROMPT: &str = "open_with ";
let mimetype_options: Vec<&JoshutoMimetypeEntry> = OpenFile::get_options(&paths[0]);