You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fn main() {
use std::fs::File;
use std::io::{BufReader, BufRead};
let rows1 = BufReader::new(File::open("data.txt").unwrap());
let rows2 = rows1.lines().map(|r| r.unwrap());
let rows3 = rows2.map(|r| r.split(','));
let mut rows4 = rows3.map(|r| r.map(|e| e.parse().unwrap()));
}
Gives an error message with a misterious "B":
error[E0282]: type annotations needed
--> ...\test.rs:7:37
|
7 | let mut rows4 = rows3.map(|r| r.map(|e| e.parse().unwrap()));
| ^^^ cannot infer type for `B`
The text was updated successfully, but these errors were encountered:
This wrong code:
Gives an error message with a misterious "B":
The text was updated successfully, but these errors were encountered: