@FrenchBoiethios French healthcare is shittier and shittier every year but it's still better and cheaper than the US one and about nobody in France goes bankrupt because of a stupid accident or disease being source of astronomical healthcare costs
I'm working on project Euler 96 to teach myself rust: https://projecteuler.net/problem=96
I've written this code to read in the file and convert it into a vector of integers.
let file = File::open(&args[1]).expect("Sudoku file not found");
let reader = BufReader::new(file);
let x = reader
...
When people update some of my programs, they call me because of errors and I tell them to do rustup update. Is there a standard way to tell cargo to fail with a proper error when the local rust install is too old ?
I'm working on Project Euler 96 to teach myself Rust. I've written this code to read in the file and convert it into a vector of integers (Playground).
let file = File::open(&args[1]).expect("Sudoku file not found");
let reader = BufReader::new(file);
let x = reader
.lines()
.map(|x| x....
The most important point in this answer is that callback based designs aren't suitable to Rust. Just don't try to apply those patterns to Rust. — Denys Séguret11 mins ago
@Stargateur re stackoverflow.com/questions/57903579/…, I don't believe OP wants an enum. His approach seems fine. He just hasn't bothered to read the serde docs AT ALL.