diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-05 20:45:04 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-05-05 20:45:04 -0400 |
commit | ebf8e5c674322a0fe85339e57b0f6a80e51087d3 (patch) | |
tree | 0c061ac6554f4f0a19c867a74d1fdfc975377711 /src/preview.rs | |
parent | 4c194de5c7e940e1eaf71c0fb4b455ba6547c880 (diff) |
cargo fmt
Diffstat (limited to 'src/preview.rs')
-rw-r--r-- | src/preview.rs | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/preview.rs b/src/preview.rs index 6002c99..3aaf9ce 100644 --- a/src/preview.rs +++ b/src/preview.rs @@ -61,39 +61,39 @@ fn preview_file(entry: &JoshutoDirEntry, win: &JoshutoPanel) { match path.extension() { Some(file_ext) => match PREVIEW_T.extension.get(file_ext.to_str().unwrap()) { Some(s) => preview_with(path, win, &s), - None => {}, -/* - None => if let Some(mimetype) = tree_magic::from_filepath(&path) { - match PREVIEW_T.mimetype.get(mimetype.as_str()) { - Some(s) => preview_with(path, win, &s), - None => if let Some(ind) = mimetype.find('/') { - let supertype = &mimetype[..ind]; - if supertype == "text" { - preview_text(path, win); - } else if let Some(s) = PREVIEW_T.mimetype.get(supertype) { - preview_with(path, win, &s); + None => {} + /* + None => if let Some(mimetype) = tree_magic::from_filepath(&path) { + match PREVIEW_T.mimetype.get(mimetype.as_str()) { + Some(s) => preview_with(path, win, &s), + None => if let Some(ind) = mimetype.find('/') { + let supertype = &mimetype[..ind]; + if supertype == "text" { + preview_text(path, win); + } else if let Some(s) = PREVIEW_T.mimetype.get(supertype) { + preview_with(path, win, &s); + } + }, + } } - }, - } - } -*/ + */ }, - None => {}, -/* - if let Some(mimetype) = tree_magic::from_filepath(&path) { - match PREVIEW_T.mimetype.get(mimetype.as_str()) { - Some(s) => preview_with(path, win, &s), - None => if let Some(ind) = mimetype.find('/') { - let supertype = &mimetype[..ind]; - if supertype == "text" { - preview_text(path, win); - } else if let Some(s) = PREVIEW_T.mimetype.get(supertype) { - preview_with(path, win, &s); + None => {} + /* + if let Some(mimetype) = tree_magic::from_filepath(&path) { + match PREVIEW_T.mimetype.get(mimetype.as_str()) { + Some(s) => preview_with(path, win, &s), + None => if let Some(ind) = mimetype.find('/') { + let supertype = &mimetype[..ind]; + if supertype == "text" { + preview_text(path, win); + } else if let Some(s) = PREVIEW_T.mimetype.get(supertype) { + preview_with(path, win, &s); + } + }, } - }, - } - } -*/ + } + */ } } |