summaryrefslogtreecommitdiffstats
path: root/src/commands/open_file.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2019-04-30 20:02:04 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2019-04-30 20:02:04 -0400
commitef98d3d408f9a741433523ccf557b26aa7380dbc (patch)
tree2b94bb2866b439c6ae70aec4ca39a63671ac3a85 /src/commands/open_file.rs
parent36d8299f224b044139d52c0f65eb66be4c25a5d0 (diff)
rework how mimetype.toml config works
Diffstat (limited to 'src/commands/open_file.rs')
-rw-r--r--src/commands/open_file.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs
index bf4d751..ffcdbac 100644
--- a/src/commands/open_file.rs
+++ b/src/commands/open_file.rs
@@ -30,9 +30,8 @@ impl OpenFile {
/* extensions have priority */
if let Some(file_ext) = path.extension() {
if let Some(file_ext) = file_ext.to_str() {
- if let Some(s) = MIMETYPE_T.extension.get(file_ext) {
- mimetype_options.extend(s.iter());
- }
+ let ext_entries = MIMETYPE_T.get_entries_for_ext(file_ext);
+ mimetype_options.extend(ext_entries);
}
}
/*