aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 982550f..c6249c4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -6,7 +6,9 @@ extern crate serde_json;
6extern crate lazy_static; 6extern crate lazy_static;
7 7
8use cursive::traits::*; 8use cursive::traits::*;
9use cursive::views::{Dialog, DummyView, EditView, LinearLayout, OnEventView, SelectView, TextView}; 9use cursive::views::{
10 Dialog, DummyView, EditView, LinearLayout, OnEventView, SelectView, TextView,
11};
10use cursive::Cursive; 12use cursive::Cursive;
11 13
12use serde_json::Value; 14use serde_json::Value;
@@ -104,7 +106,8 @@ fn search(s: &mut Cursive) {
104 Dialog::around(EditView::new().on_submit(go).with_id("search")) 106 Dialog::around(EditView::new().on_submit(go).with_id("search"))
105 .title("Search for a page") 107 .title("Search for a page")
106 .button("Go", |s| { 108 .button("Go", |s| {
107 let search_txt = s.call_on_id("search", |v: &mut EditView| v.get_content()) 109 let search_txt = s
110 .call_on_id("search", |v: &mut EditView| v.get_content())
108 .unwrap(); 111 .unwrap();
109 go(s, &search_txt); 112 go(s, &search_txt);
110 }) 113 })