curl implementation
This commit is contained in:
@@ -31,7 +31,7 @@ pub fn get_json(path: &Path) -> HashMap<String, String> {
|
||||
|
||||
fn read_file(path: &Path) -> String {
|
||||
let read_result = File::open(path);
|
||||
let mut result= String::new();
|
||||
let mut result = String::new();
|
||||
|
||||
match read_result {
|
||||
Ok(mut t) => {
|
||||
@@ -45,7 +45,7 @@ fn read_file(path: &Path) -> String {
|
||||
},
|
||||
Err(err) => match err.kind() {
|
||||
ErrorKind::NotFound => {
|
||||
println!("[ERROR] The file '{}' does not exist", path.display());
|
||||
eprintln!("[ERROR] The file '{}' does not exist", path.display());
|
||||
exit(1);
|
||||
},
|
||||
_ => panic!("[ERROR] Unexpected error, closing ..."),
|
||||
|
Reference in New Issue
Block a user