[thin_check (rust)] Remove some unused params from NodeVisitor::visit

This commit is contained in:
Joe Thornber 2020-08-20 10:46:06 +01:00
parent 1999343d2f
commit 936e06e132
2 changed files with 5 additions and 5 deletions

View File

@ -147,7 +147,7 @@ pub fn unpack_node<V: Unpack>(
//------------------------------------------ //------------------------------------------
pub trait NodeVisitor<V: Unpack> { pub trait NodeVisitor<V: Unpack> {
fn visit(&mut self, w: &BTreeWalker, b: &Block, node: &Node<V>) -> Result<()>; fn visit(&mut self, node: &Node<V>) -> Result<()>;
} }
#[derive(Clone)] #[derive(Clone)]
@ -225,7 +225,7 @@ impl BTreeWalker {
} }
let node = unpack_node::<V>(&b.get_data(), self.ignore_non_fatal, is_root)?; let node = unpack_node::<V>(&b.get_data(), self.ignore_non_fatal, is_root)?;
visitor.visit(self, &b, &node)?; visitor.visit(&node)?;
if let Node::Internal { if let Node::Internal {
header: _h, header: _h,
@ -281,7 +281,7 @@ impl<V> ValueCollector<V> {
} }
impl<V: Unpack + Clone> NodeVisitor<V> for ValueCollector<V> { impl<V: Unpack + Clone> NodeVisitor<V> for ValueCollector<V> {
fn visit(&mut self, _w: &BTreeWalker, _b: &Block, node: &Node<V>) -> Result<()> { fn visit(&mut self, node: &Node<V>) -> Result<()> {
if let Node::Leaf { if let Node::Leaf {
header: _h, header: _h,
keys, keys,

View File

@ -50,7 +50,7 @@ struct BottomLevelVisitor {
//------------------------------------------ //------------------------------------------
impl NodeVisitor<BlockTime> for BottomLevelVisitor { impl NodeVisitor<BlockTime> for BottomLevelVisitor {
fn visit(&mut self, _w: &BTreeWalker, _b: &Block, node: &Node<BlockTime>) -> Result<()> { fn visit(&mut self, node: &Node<BlockTime>) -> Result<()> {
// FIXME: do other checks // FIXME: do other checks
if let Node::Leaf { if let Node::Leaf {
@ -132,7 +132,7 @@ impl<'a> OverflowChecker<'a> {
} }
impl<'a> NodeVisitor<u32> for OverflowChecker<'a> { impl<'a> NodeVisitor<u32> for OverflowChecker<'a> {
fn visit(&mut self, _w: &BTreeWalker, _b: &Block, node: &Node<u32>) -> Result<()> { fn visit(&mut self, node: &Node<u32>) -> Result<()> {
if let Node::Leaf { if let Node::Leaf {
header: _h, header: _h,
keys, keys,