Skip to content

Commit dc80b65

Browse files
committed
Update bits.rs to bitvec 0.20 API
1 parent d8fa2bd commit dc80b65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/bits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn draw_row<O, T>(turtle: &mut Turtle, row: &BitSlice<O, T>)
206206
where O: BitOrder, T: BitStore {
207207
// `&BitSlice` can iterate over bits. It is just like `&[bool]`, and so it
208208
// produces `&bool` for each loop.
209-
for &bit in row {
209+
for bit in row.iter().by_val() {
210210
// This checks if the bit produced by the row is `1` or `0`, and sets
211211
// the pen color to black (`1`) or light grey (`0`)
212212
if bit {

0 commit comments

Comments
 (0)