aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 85d25e7..a5c10e1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -123,10 +123,7 @@ fn on_submit(s: &mut Cursive, name: &str) {
123 let mut link_vec: Vec<String> = vec![]; 123 let mut link_vec: Vec<String> = vec![];
124 124
125 let mut res = reqwest::get(&url).unwrap(); 125 let mut res = reqwest::get(&url).unwrap();
126 let v: Value = match serde_json::from_str(&res.text().unwrap()) { 126 let v: Value = res.json().expect("Failed to parse json");
127 Ok(x) => x,
128 Err(x) => panic!("Failed to parse json\nReceived error {}", x),
129 };
130 127
131 match get_extract(&v) { 128 match get_extract(&v) {
132 Ok(x) => extract = x, 129 Ok(x) => extract = x,