diff --git a/src/config.rs b/src/config.rs index 43a4496..4a323f2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -117,7 +117,7 @@ pub fn parse(text: &str) -> Result { } // skip comments - if let Some('#') = line.chars().nth(0) { + if let Some('#') = line.chars().next() { continue; } diff --git a/src/ui.rs b/src/ui.rs index 6a2a6d9..c3e8a12 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -27,7 +27,6 @@ use crate::{ utils, BUG_URL, }; use lazy_static; -use libc; use std::{ io::{stdin, stdout, Result, Write}, process::{self, Stdio}, @@ -223,9 +222,8 @@ impl UI { }; } - self.load(title, url).and_then(|view| { + self.load(title, url).map(|view| { self.add_view(view); - Ok(()) }) }