Skip to content

Commit 9ddb7c8

Browse files
committed
refactor(bit_machine): remove unused as_bit_iter method and use cursor-based iterator
1 parent a4cbd56 commit 9ddb7c8

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

src/bit_machine/frame.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,6 @@ impl Frame {
115115
}
116116
}
117117

118-
/// Extend the present frame with a read-only reference the the data
119-
/// and return the resulting struct.
120-
pub(super) fn as_bit_iter<'a>(
121-
&self,
122-
data: &'a [u8],
123-
) -> BitIter<core::iter::Copied<core::slice::Iter<'a, u8>>> {
124-
BitIter::byte_slice_window(data, self.start, self.start + self.len)
125-
}
126-
127118
/// Like [`as_bit_iter`] but starts from the current cursor position rather than the frame start.
128119
pub(super) fn as_bit_iter_from_cursor<'a>(
129120
&self,

src/bit_machine/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ impl BitMachine {
432432
let out_frame = self.write.last_mut().unwrap();
433433
out_frame.reset_cursor();
434434
let value = Value::from_padded_bits(
435-
&mut out_frame.as_bit_iter(&self.data),
435+
&mut out_frame.as_bit_iter_from_cursor(&self.data),
436436
&program.arrow().target,
437437
)
438438
.expect("Decode value of output frame");

0 commit comments

Comments
 (0)