From cd350b15b97be0196121b41618efb07312be3bc4 Mon Sep 17 00:00:00 2001 From: chris west Date: Sat, 23 May 2020 11:40:26 -0700 Subject: [PATCH] Show unknown types as binary (downloads) --- src/menu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu.rs b/src/menu.rs index 9dbbe93..6d1844e 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -917,7 +917,7 @@ pub fn parse_line(start: usize, raw: &str) -> Option { } else { end }; - let typ = Type::from(line.chars().nth(0)?)?; + let typ = Type::from(line.chars().next()?).unwrap_or(Type::Binary); let mut truncated_len = if text_end - start > MAX_COLS { MAX_COLS + 1