changed option return type into result

This commit is contained in:
2025-01-19 02:14:41 +01:00
parent 5fca81c6bf
commit a5d1fc6669
2 changed files with 7 additions and 7 deletions

View File

@@ -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}"),
}
}
},