sharksforarms / deku

Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typo in comment

marvk opened this issue Β· comments

commented

Hey, just noticed a little typo in a comment. Don't want to open a whole PR for this, so maybe someone who's already working on stuff can do a little fix along the way πŸ™‚

L98 should presumably read "bytes", not "bits"

deku/src/impls/vec.rs

Lines 90 to 104 in d045596

// Read until a given quantity of bits have been read
Limit::BitSize(size) => {
let bit_size = size.0;
read_vec_with_predicate(input, None, inner_ctx, move |read_bits, _| {
read_bits == bit_size
})
}
// Read until a given quantity of bits have been read
Limit::ByteSize(size) => {
let bit_size = size.0 * 8;
read_vec_with_predicate(input, None, inner_ctx, move |read_bits, _| {
read_bits == bit_size
})
}