From b640970819482aa61eb5a7a661644e8f41a5aed6 Mon Sep 17 00:00:00 2001 From: Matthias Sieber Date: Wed, 1 Aug 2018 16:40:43 -0700 Subject: changes as suggested by clippy --- src/main.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index fd01af8..85d25e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,9 +6,7 @@ extern crate serde_json; extern crate lazy_static; use cursive::traits::*; -use cursive::views::{ - Dialog, DummyView, EditView, LinearLayout, OnEventView, SelectView, TextView, -}; +use cursive::views::{Dialog, DummyView, EditView, LinearLayout, OnEventView, SelectView, TextView}; use cursive::Cursive; use serde_json::Value; @@ -83,7 +81,7 @@ fn search(s: &mut Cursive) { let mut result = vec![]; match get_search_results(&search) { Ok(x) => result = x, - Err(e) => pop_error(s, handler(e)), + Err(e) => pop_error(s, &handler(&e)), }; let choose_result = SelectView::::new() .with_all_str(result) @@ -132,15 +130,15 @@ fn on_submit(s: &mut Cursive, name: &str) { match get_extract(&v) { Ok(x) => extract = x, - Err(e) => pop_error(s, handler(e)), + Err(e) => pop_error(s, &handler(&e)), }; match get_links(&v) { Ok(x) => link_vec = x, - Err(e) => pop_error(s, handler(e)), + Err(e) => pop_error(s, &handler(&e)), }; // get the act together - let article_content = TextView::new(extract_formatter(extract)).scrollable(); + let article_content = TextView::new(extract_formatter(&extract)).scrollable(); let links = SelectView::::new() .with_all_str(link_vec) -- cgit v1.2.3