diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 7 |
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; | |||
6 | extern crate lazy_static; | 6 | extern crate lazy_static; |
7 | 7 | ||
8 | use cursive::traits::*; | 8 | use cursive::traits::*; |
9 | use cursive::views::{Dialog, DummyView, EditView, LinearLayout, OnEventView, SelectView, TextView}; | 9 | use cursive::views::{ |
10 | Dialog, DummyView, EditView, LinearLayout, OnEventView, SelectView, TextView, | ||
11 | }; | ||
10 | use cursive::Cursive; | 12 | use cursive::Cursive; |
11 | 13 | ||
12 | use serde_json::Value; | 14 | use 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 | }) |