Skip to content

Commit 02233db

Browse files
committed
Remove unused fields in some structures
The dead_code lint was previously eroneously missing those. Since this lint bug has been fixed, the unused fields need to be removed.
1 parent b46f839 commit 02233db

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

alloc/src/collections/btree/navigate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ impl<BorrowType: marker::BorrowType, K, V> NodeRef<BorrowType, K, V, marker::Lea
655655
pub enum Position<BorrowType, K, V> {
656656
Leaf(NodeRef<BorrowType, K, V, marker::Leaf>),
657657
Internal(NodeRef<BorrowType, K, V, marker::Internal>),
658-
InternalKV(Handle<NodeRef<BorrowType, K, V, marker::Internal>, marker::KV>),
658+
InternalKV,
659659
}
660660

661661
impl<'a, K: 'a, V: 'a> NodeRef<marker::Immut<'a>, K, V, marker::LeafOrInternal> {
@@ -677,7 +677,7 @@ impl<'a, K: 'a, V: 'a> NodeRef<marker::Immut<'a>, K, V, marker::LeafOrInternal>
677677
visit(Position::Leaf(leaf));
678678
match edge.next_kv() {
679679
Ok(kv) => {
680-
visit(Position::InternalKV(kv));
680+
visit(Position::InternalKV);
681681
kv.right_edge()
682682
}
683683
Err(_) => return,
@@ -699,7 +699,7 @@ impl<'a, K: 'a, V: 'a> NodeRef<marker::Immut<'a>, K, V, marker::LeafOrInternal>
699699
self.visit_nodes_in_order(|pos| match pos {
700700
Position::Leaf(node) => result += node.len(),
701701
Position::Internal(node) => result += node.len(),
702-
Position::InternalKV(_) => (),
702+
Position::InternalKV => (),
703703
});
704704
result
705705
}

alloc/src/collections/btree/node/tests.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ impl<'a, K: 'a, V: 'a> NodeRef<marker::Immut<'a>, K, V, marker::LeafOrInternal>
3232
result += &format!("\n{}{:?}", indent, leaf.keys());
3333
}
3434
navigate::Position::Internal(_) => {}
35-
navigate::Position::InternalKV(kv) => {
36-
let depth = self.height() - kv.into_node().height();
37-
let indent = " ".repeat(depth);
38-
result += &format!("\n{}{:?}", indent, kv.into_kv().0);
39-
}
35+
navigate::Position::InternalKV => {}
4036
});
4137
result
4238
}

test/src/console.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ pub struct ConsoleTestDiscoveryState {
4646
pub tests: usize,
4747
pub benchmarks: usize,
4848
pub ignored: usize,
49-
pub options: Options,
5049
}
5150

5251
impl ConsoleTestDiscoveryState {
@@ -56,13 +55,7 @@ impl ConsoleTestDiscoveryState {
5655
None => None,
5756
};
5857

59-
Ok(ConsoleTestDiscoveryState {
60-
log_out,
61-
tests: 0,
62-
benchmarks: 0,
63-
ignored: 0,
64-
options: opts.options,
65-
})
58+
Ok(ConsoleTestDiscoveryState { log_out, tests: 0, benchmarks: 0, ignored: 0 })
6659
}
6760

6861
pub fn write_log<F, S>(&mut self, msg: F) -> io::Result<()>

0 commit comments

Comments
 (0)