-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Lines 79 to 83 in a69bdf9
/// Read CSV data into a new ndarray with the given shape | |
pub fn read<A>(shape: (usize, usize), reader: &mut Reader<impl Read>) -> Result<Array2<A>, Error> | |
where | |
A: Copy, | |
for<'de> A: serde::Deserialize<'de>, |
Mixing type parameters and impl Trait in the same signature makes it impossible to use with turbofish. Turbofish is commonly needed for signatures where some type parameter appears only in the return type.
use std::io::{Cursor, Read};
fn read<A>(_reader: impl Read) -> A {
unimplemented!()
}
fn main() {
let reader = Cursor::new(Vec::new());
let _: u8 = read(reader); // okay
let _ = read::<u8>(reader); // not supported
}
Metadata
Metadata
Assignees
Labels
No labels