From a8c8b255a43e90885f20ab54d12c89feda8c0b46 Mon Sep 17 00:00:00 2001 From: chris west Date: Tue, 14 Jan 2020 23:29:26 -0800 Subject: [PATCH] redundant --- src/gopher.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gopher.rs b/src/gopher.rs index 5f88b69..9c7dcbc 100644 --- a/src/gopher.rs +++ b/src/gopher.rs @@ -228,10 +228,8 @@ pub fn type_for_url(url: &str) -> Type { } if let Some(idx) = url.find('/') { - if url.len() > idx { - if let Some(t) = url.chars().nth(idx + 1) { - return Type::from(t).unwrap_or(Type::Menu); - } + if let Some(t) = url.chars().nth(idx + 1) { + return Type::from(t).unwrap_or(Type::Menu); } }