[thin_check (rust)] Make NodeVisitor::visit non mut.

Preparation for making btree_walk multithreaded
This commit is contained in:
Joe Thornber
2020-08-20 11:05:14 +01:00
parent a1c206b774
commit 2cc2dffab5
2 changed files with 11 additions and 11 deletions

View File

@@ -50,7 +50,7 @@ struct BottomLevelVisitor {
//------------------------------------------
impl NodeVisitor<BlockTime> for BottomLevelVisitor {
fn visit(&mut self, _h: &NodeHeader, _k: &[u64], values: &[BlockTime]) -> Result<()> {
fn visit(&self, _h: &NodeHeader, _k: &[u64], values: &[BlockTime]) -> Result<()> {
// FIXME: do other checks
if values.len() == 0 {
@@ -124,7 +124,7 @@ impl<'a> OverflowChecker<'a> {
}
impl<'a> NodeVisitor<u32> for OverflowChecker<'a> {
fn visit(&mut self, _h: &NodeHeader, keys: &[u64], values: &[u32]) -> Result<()> {
fn visit(&self, _h: &NodeHeader, keys: &[u64], values: &[u32]) -> Result<()> {
for n in 0..keys.len() {
let k = keys[n];
let v = values[n];