changed option return type into result
This commit is contained in:
@@ -29,8 +29,8 @@ pub fn read_messages(mut request: curl::easy::Easy, data: &str) {
|
||||
// send curl request
|
||||
let res = crate::curl::request(&mut request, &data);
|
||||
match res {
|
||||
Some(t) => println!("Response code: {t}"),
|
||||
None => eprintln!("[ERROR] Something went wrong with the CURL request"),
|
||||
Ok(t) => println!("Response code: {t}"),
|
||||
Err(e) => eprintln!("[ERROR] Something went wrong with the CURL request:\n{e}"),
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user