Commit a04a2ea
refactor: use collect_bool in BitBuffer From<Vec<bool>> impl
Simplified the `From<&[bool]>` implementation for `BitBufferMut` to
directly call the existing optimized `BitBuffer::collect_bool` function
instead of duplicating its logic.
**Before**: Duplicated the 64-bit packing logic inline (34 lines)
**After**: Call the existing function (1 line)
```rust
BitBuffer::collect_bool(value.len(), |i| value[i]).into_mut()
```
This maintains the same performance optimization while reducing code
duplication and improving maintainability. Any future improvements to
`collect_bool` will automatically benefit this code path as well.1 parent 8d70278 commit a04a2ea
1 file changed
+2
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
| 544 | + | |
| 545 | + | |
576 | 546 | | |
577 | 547 | | |
578 | 548 | | |
| |||
0 commit comments