Restore Msb0 as Lsb0 is bugged - BEP 003 uses MSB

This commit is contained in:
Igor Katson 2024-08-20 22:19:37 +01:00
parent ea39ec787a
commit cd4d812aca
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
4 changed files with 21 additions and 21 deletions

View file

@ -199,8 +199,8 @@ pub enum Message<ByteBuf: std::hash::Hash + Eq> {
pub type MessageBorrowed<'a> = Message<ByteBuf<'a>>;
pub type MessageOwned = Message<ByteBufOwned>;
pub type BitfieldBorrowed<'a> = &'a bitvec::slice::BitSlice<u8, bitvec::order::Lsb0>;
pub type BitfieldOwned = bitvec::vec::BitVec<u8, bitvec::order::Lsb0>;
pub type BitfieldBorrowed<'a> = &'a bitvec::slice::BitSlice<u8, bitvec::order::Msb0>;
pub type BitfieldOwned = bitvec::vec::BitVec<u8, bitvec::order::Msb0>;
pub struct Bitfield<'a> {
pub data: BitfieldBorrowed<'a>,