d
Size: a a a
d
d
AT
d
A
A
АГ
A
AZ
frequency = io::stdin()Насколько плохо писать так код "пытаться распарсить число с консоли"?
.lock()
.lines()
.map(|x| {
let x = x.map_err(|e| e.to_string())?;
x.parse().map_err(|e: ParseIntError| e.to_string())
})
.inspect(|r| {
if r.is_err() {
println!("Couldn't parse line as a number");
}
})
.filter_map(|x| x.ok())
.next()
.unwrap();
d
A
асинхрон, так асинхрон
написал хотя подумал про синхрон))A
frequency = io::stdin()Насколько плохо писать так код "пытаться распарсить число с консоли"?
.lock()
.lines()
.map(|x| {
let x = x.map_err(|e| e.to_string())?;
x.parse().map_err(|e: ParseIntError| e.to_string())
})
.inspect(|r| {
if r.is_err() {
println!("Couldn't parse line as a number");
}
})
.filter_map(|x| x.ok())
.next()
.unwrap();
A
M
AZ
AZ
$ rustup component add rustfmt --toolchain nightly-x86_64-pc-windows-gnu
error: component 'rustfmt' for target 'x86_64-pc-windows-gnu' is unavailable for download for channel nightly
Sometimes not all components are available in any given nightly.
A
.parse().map_err(|e: ParseIntError| e.to_string())
делать?A
A
AZ
.parse().map_err(|e: ParseIntError| e.to_string())
делать?