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); } }