Hi everyone! I am quite new to Rust. I have been reading The Book, completing the rustlings exercises and would like to train with some 'codewars' and 'open.kattis' challenges.
Sometimes the code is required to read a given input from terminal. And when it is a number, usually I see this method which parses a string:
let mut input_text = String::new();
io::stdin()
.read_line(&mut input_text)
.expect("failed to read from stdin");
After this I can extract the numeric value, if there is one, and make calculations with it.
I wonder, though, if it is possible to not have this conversion step. But to expect and integer and store it directly, like it is possible with C, with only standard libraries?