-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
The following code:
extern crate smallvec;
fn main() {
let mut vec: smallvec::SmallVec<[u8; 8]> = smallvec::SmallVec::new();
vec.push(5);
println!("{:?}", vec.len());
for num in vec.into_iter() {
println!("{:?}", num);
}
}Prints:
1
Expected:
1
5
This is probably because into_iter() sets the length to 0, and then only calls iter_mut(), therefore getting an iterator of length 0.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels