ext.rs
SHA-256d7661df1f28cea80469e0209e9584861f46b1414b44b1228cca5199902b07dcd
Malecule∅
Evidence
1use std::io;
2use smallvec::{Array, SmallVec};
3
4pub trait ReadExt: io::Read {
⋯7 lines
16:22… - buf.len())
17 }
18}
19
20impl<T: io::Read> ReadExt for T { }
21
22// TODO: It would be nice if we could somehow have one trait that could give us
23// either SmallVec or Vec.
24pub trait IntoCollection<T> {
25 fn into_collection<A …
50:83… > {
51 self.into_iter().map(|item| f(item)).collect()
52 }
53}
⋯4 lines