summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2022-09-26 08:32:21 +0200
committerqkzk <qu3nt1n@gmail.com>2022-09-26 08:32:21 +0200
commit5e7e33c83588f39dc61e02d4b022443d11d88010 (patch)
tree833ef51be3ed13c4085abd19a2044dbb033f2dc8
parentacffa9cc0bfbf4cd36e606df1075d16235c82766 (diff)
clippy, readmefile-kind-enum
-rw-r--r--readme.md2
-rw-r--r--src/main.rs9
2 files changed, 4 insertions, 7 deletions
diff --git a/readme.md b/readme.md
index 820d6e08..0b2bb242 100644
--- a/readme.md
+++ b/readme.md
@@ -38,6 +38,7 @@
- [x] up / down
- [x] links are followed
- [x] resize (i guess it's an event like in curse) seems to work already
+- [x] dirsymbol for sockets and whatever
- [x] refactor FileInfo, use an enum
## TODO
@@ -52,7 +53,6 @@
- [ ] regex
- [ ] search
- [ ] mark multiple files
-- [ ] dirsymbol for sockets and whatever
## BUGS
diff --git a/src/main.rs b/src/main.rs
index 55ce7132..99e3afe3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -658,12 +658,9 @@ impl Status {
fn exec_goto(&mut self) {
let target = self.input_string.clone();
self.input_string.clear();
- match std::fs::canonicalize(path::Path::new(&target)) {
- Ok(path) => {
- self.path_content = PathContent::new(path, self.args.hidden);
- self.window.reset(self.path_content.files.len());
- }
- Err(_) => (),
+ if let Ok(path) = std::fs::canonicalize(path::Path::new(&target)) {
+ self.path_content = PathContent::new(path, self.args.hidden);
+ self.window.reset(self.path_content.files.len());
}
}