Closed mihaicostin34 closed 8 months ago
I keep having this problem. I have tried to return -1 in the main function as an Err(255) and with process::exit(255), yet they don't seem to work. Is there another way to return -1?
You have to return -1, not 255. The data type should be i32. Take a look at https://doc.rust-lang.org/std/process/fn.exit.html.
i32
I keep having this problem. I have tried to return -1 in the main function as an Err(255) and with process::exit(255), yet they don't seem to work. Is there another way to return -1?