You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
344 B
9 lines
344 B
fn main() { |
|
let data = [0b1000_0001u8, 0b0000_0010, 0b1000_0011]; |
|
let mut main_iter = data.iter(); |
|
let mut simple_iter = main_iter.take_while(|x| *x & 0b1000_000 != 0b1000_0000); |
|
println!("{:?}", simple_iter); |
|
|
|
let mut next_iter = main_iter.take_while(|x| *x & 0b1000_000 != 0b1000_0000); |
|
println!("{:?}", next_iter); |
|
}
|
|
|