From 993ce83800a4b4b46ba70cd66f295f8847a76068 Mon Sep 17 00:00:00 2001 From: chris west Date: Fri, 23 Oct 2020 14:19:21 -0700 Subject: [PATCH] fix clippyisms --- src/config.rs | 2 +- src/ui.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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(()) }) }