allow dead_code for block_range.rs
+#![allow(dead_code)]
+
/// Given a range and iterate sub-range for each block
pub struct BlockIter {
pub begin: usize,
@@ -14,11 +16,11 @@ pub struct BlockRange {
}
impl BlockRange {
- pub fn _len(&self) -> usize {
+ pub fn len(&self) -> usize {
self.end - self.begin
}
- pub fn _is_full(&self) -> bool {
- self._len() == (1usize << self.block_size_log2)
+ pub fn is_full(&self) -> bool {
+ self.len() == (1usize << self.block_size_log2)
}
pub fn origin_begin(&self) -> usize {
(self.block << self.block_size_log2) + self.begin
