Fix various clippy lints

This commit is contained in:
Paul Hauner
2019-02-13 07:46:59 +11:00
parent 05ed778ccc
commit 4824b43808
2 changed files with 6 additions and 1 deletions

View File

@@ -81,6 +81,11 @@ impl BooleanBitfield {
self.0.len()
}
/// Returns true if `self.len() == 0`
pub fn is_empty(&self) -> bool {
self.len() == 0
}
/// Returns the number of bytes required to represent this bitfield.
pub fn num_bytes(&self) -> usize {
self.to_bytes().len()