Skip to content

Commit 3bce55a

Browse files
authored
Updates related to rustc 1.83.0 (#688)
* clippy lints * respect cargo-valgrind's Cargo.lock
1 parent 598f8df commit 3bce55a

12 files changed

+50
-50
lines changed

.github/workflows/valgrind.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
matrix:
1414
os: [ubuntu-latest]
1515
rust:
16-
- stable
16+
- 1.82.0
1717
steps:
1818
- name: Cancel Previous Runs
1919
uses: styfle/[email protected]
@@ -34,7 +34,7 @@ jobs:
3434
- run: sudo apt-get install -y valgrind
3535
if: matrix.os == 'ubuntu-latest'
3636
- run: cargo install cargo-valgrind
37-
- name: run cargo valgrind
37+
- name: run cargo valgrind --locked
3838
run: |
3939
cargo valgrind test --all-targets --all-features
4040
- name: run cargo valgrind on doc tests

src/edge_differences.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub type EdgeInsertion = EdgeDifference<Insertion>;
149149
/// Type alias for [`EdgeDifference<Removal>`]
150150
pub type EdgeRemoval = EdgeDifference<Removal>;
151151

152-
impl<'a, T> Iterator for EdgeDifferences<'a, T>
152+
impl<T> Iterator for EdgeDifferences<'_, T>
153153
where
154154
T: private::EdgeDifferenceIteration,
155155
{

src/edge_table.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn make_edge_table_row(table: &EdgeTable, pos: tsk_id_t) -> Option<EdgeTableRow>
4343
pub(crate) type EdgeTableRefIterator<'a> = crate::table_iterator::TableIterator<&'a EdgeTable>;
4444
pub(crate) type EdgeTableIterator = crate::table_iterator::TableIterator<EdgeTable>;
4545

46-
impl<'a> Iterator for EdgeTableRefIterator<'a> {
46+
impl Iterator for EdgeTableRefIterator<'_> {
4747
type Item = EdgeTableRow;
4848

4949
fn next(&mut self) -> Option<Self::Item> {
@@ -89,7 +89,7 @@ impl<'a> EdgeTableRowView<'a> {
8989
}
9090
}
9191

92-
impl<'a> PartialEq for EdgeTableRowView<'a> {
92+
impl PartialEq for EdgeTableRowView<'_> {
9393
fn eq(&self, other: &Self) -> bool {
9494
self.id == other.id
9595
&& self.parent == other.parent
@@ -100,9 +100,9 @@ impl<'a> PartialEq for EdgeTableRowView<'a> {
100100
}
101101
}
102102

103-
impl<'a> Eq for EdgeTableRowView<'a> {}
103+
impl Eq for EdgeTableRowView<'_> {}
104104

105-
impl<'a> PartialEq<EdgeTableRow> for EdgeTableRowView<'a> {
105+
impl PartialEq<EdgeTableRow> for EdgeTableRowView<'_> {
106106
fn eq(&self, other: &EdgeTableRow) -> bool {
107107
self.id == other.id
108108
&& self.parent == other.parent
@@ -124,7 +124,7 @@ impl PartialEq<EdgeTableRowView<'_>> for EdgeTableRow {
124124
}
125125
}
126126

127-
impl<'a> streaming_iterator::StreamingIterator for EdgeTableRowView<'a> {
127+
impl streaming_iterator::StreamingIterator for EdgeTableRowView<'_> {
128128
type Item = Self;
129129

130130
row_lending_iterator_get!();

src/individual_table.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl<'a> IndividualTableRowView<'a> {
5050
}
5151
}
5252

53-
impl<'a> PartialEq for IndividualTableRowView<'a> {
53+
impl PartialEq for IndividualTableRowView<'_> {
5454
fn eq(&self, other: &Self) -> bool {
5555
self.id == other.id
5656
&& self.flags == other.flags
@@ -60,9 +60,9 @@ impl<'a> PartialEq for IndividualTableRowView<'a> {
6060
}
6161
}
6262

63-
impl<'a> Eq for IndividualTableRowView<'a> {}
63+
impl Eq for IndividualTableRowView<'_> {}
6464

65-
impl<'a> PartialEq<IndividualTableRow> for IndividualTableRowView<'a> {
65+
impl PartialEq<IndividualTableRow> for IndividualTableRowView<'_> {
6666
fn eq(&self, other: &IndividualTableRow) -> bool {
6767
self.id == other.id
6868
&& self.flags == other.flags
@@ -82,7 +82,7 @@ impl PartialEq<IndividualTableRowView<'_>> for IndividualTableRow {
8282
}
8383
}
8484

85-
impl<'a> streaming_iterator::StreamingIterator for IndividualTableRowView<'a> {
85+
impl streaming_iterator::StreamingIterator for IndividualTableRowView<'_> {
8686
type Item = Self;
8787

8888
row_lending_iterator_get!();
@@ -162,7 +162,7 @@ pub(crate) type IndividualTableRefIterator<'a> =
162162
crate::table_iterator::TableIterator<&'a IndividualTable>;
163163
pub(crate) type IndividualTableIterator = crate::table_iterator::TableIterator<IndividualTable>;
164164

165-
impl<'a> Iterator for IndividualTableRefIterator<'a> {
165+
impl Iterator for IndividualTableRefIterator<'_> {
166166
type Item = IndividualTableRow;
167167

168168
fn next(&mut self) -> Option<Self::Item> {

src/migration_table.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub(crate) type MigrationTableRefIterator<'a> =
5252
crate::table_iterator::TableIterator<&'a MigrationTable>;
5353
pub(crate) type MigrationTableIterator = crate::table_iterator::TableIterator<MigrationTable>;
5454

55-
impl<'a> Iterator for MigrationTableRefIterator<'a> {
55+
impl Iterator for MigrationTableRefIterator<'_> {
5656
type Item = MigrationTableRow;
5757

5858
fn next(&mut self) -> Option<Self::Item> {
@@ -101,7 +101,7 @@ impl<'a> MigrationTableRowView<'a> {
101101
}
102102
}
103103

104-
impl<'a> PartialEq for MigrationTableRowView<'a> {
104+
impl PartialEq for MigrationTableRowView<'_> {
105105
fn eq(&self, other: &Self) -> bool {
106106
self.id == other.id
107107
&& self.node == other.node
@@ -114,9 +114,9 @@ impl<'a> PartialEq for MigrationTableRowView<'a> {
114114
}
115115
}
116116

117-
impl<'a> Eq for MigrationTableRowView<'a> {}
117+
impl Eq for MigrationTableRowView<'_> {}
118118

119-
impl<'a> PartialEq<MigrationTableRow> for MigrationTableRowView<'a> {
119+
impl PartialEq<MigrationTableRow> for MigrationTableRowView<'_> {
120120
fn eq(&self, other: &MigrationTableRow) -> bool {
121121
self.id == other.id
122122
&& self.node == other.node
@@ -142,7 +142,7 @@ impl PartialEq<MigrationTableRowView<'_>> for MigrationTableRow {
142142
}
143143
}
144144

145-
impl<'a> streaming_iterator::StreamingIterator for MigrationTableRowView<'a> {
145+
impl streaming_iterator::StreamingIterator for MigrationTableRowView<'_> {
146146
type Item = Self;
147147

148148
row_lending_iterator_get!();

src/mutation_table.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub(crate) type MutationTableRefIterator<'a> =
5555
crate::table_iterator::TableIterator<&'a MutationTable>;
5656
pub(crate) type MutationTableIterator = crate::table_iterator::TableIterator<MutationTable>;
5757

58-
impl<'a> Iterator for MutationTableRefIterator<'a> {
58+
impl Iterator for MutationTableRefIterator<'_> {
5959
type Item = MutationTableRow;
6060

6161
fn next(&mut self) -> Option<Self::Item> {
@@ -102,7 +102,7 @@ impl<'a> MutationTableRowView<'a> {
102102
}
103103
}
104104

105-
impl<'a> PartialEq for MutationTableRowView<'a> {
105+
impl PartialEq for MutationTableRowView<'_> {
106106
fn eq(&self, other: &Self) -> bool {
107107
self.id == other.id
108108
&& self.site == other.site
@@ -114,9 +114,9 @@ impl<'a> PartialEq for MutationTableRowView<'a> {
114114
}
115115
}
116116

117-
impl<'a> Eq for MutationTableRowView<'a> {}
117+
impl Eq for MutationTableRowView<'_> {}
118118

119-
impl<'a> PartialEq<MutationTableRow> for MutationTableRowView<'a> {
119+
impl PartialEq<MutationTableRow> for MutationTableRowView<'_> {
120120
fn eq(&self, other: &MutationTableRow) -> bool {
121121
self.id == other.id
122122
&& self.site == other.site
@@ -140,7 +140,7 @@ impl PartialEq<MutationTableRowView<'_>> for MutationTableRow {
140140
}
141141
}
142142

143-
impl<'a> streaming_iterator::StreamingIterator for MutationTableRowView<'a> {
143+
impl streaming_iterator::StreamingIterator for MutationTableRowView<'_> {
144144
type Item = Self;
145145

146146
row_lending_iterator_get!();

src/node_table.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn make_node_table_row(table: &NodeTable, pos: tsk_id_t) -> Option<NodeTableRow>
4545
pub(crate) type NodeTableRefIterator<'a> = crate::table_iterator::TableIterator<&'a NodeTable>;
4646
pub(crate) type NodeTableIterator = crate::table_iterator::TableIterator<NodeTable>;
4747

48-
impl<'a> Iterator for NodeTableRefIterator<'a> {
48+
impl Iterator for NodeTableRefIterator<'_> {
4949
type Item = NodeTableRow;
5050

5151
fn next(&mut self) -> Option<Self::Item> {
@@ -90,7 +90,7 @@ impl<'a> NodeTableRowView<'a> {
9090
}
9191
}
9292

93-
impl<'a> PartialEq for NodeTableRowView<'a> {
93+
impl PartialEq for NodeTableRowView<'_> {
9494
fn eq(&self, other: &Self) -> bool {
9595
self.id == other.id
9696
&& self.flags == other.flags
@@ -101,9 +101,9 @@ impl<'a> PartialEq for NodeTableRowView<'a> {
101101
}
102102
}
103103

104-
impl<'a> Eq for NodeTableRowView<'a> {}
104+
impl Eq for NodeTableRowView<'_> {}
105105

106-
impl<'a> PartialEq<NodeTableRow> for NodeTableRowView<'a> {
106+
impl PartialEq<NodeTableRow> for NodeTableRowView<'_> {
107107
fn eq(&self, other: &NodeTableRow) -> bool {
108108
self.id == other.id
109109
&& self.flags == other.flags
@@ -125,7 +125,7 @@ impl PartialEq<NodeTableRowView<'_>> for NodeTableRow {
125125
}
126126
}
127127

128-
impl<'a> streaming_iterator::StreamingIterator for NodeTableRowView<'a> {
128+
impl streaming_iterator::StreamingIterator for NodeTableRowView<'_> {
129129
type Item = Self;
130130

131131
row_lending_iterator_get!();

src/population_table.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub(crate) type PopulationTableRefIterator<'a> =
3838
crate::table_iterator::TableIterator<&'a PopulationTable>;
3939
pub(crate) type PopulationTableIterator = crate::table_iterator::TableIterator<PopulationTable>;
4040

41-
impl<'a> Iterator for PopulationTableRefIterator<'a> {
41+
impl Iterator for PopulationTableRefIterator<'_> {
4242
type Item = PopulationTableRow;
4343

4444
fn next(&mut self) -> Option<Self::Item> {
@@ -75,15 +75,15 @@ impl<'a> PopulationTableRowView<'a> {
7575
}
7676
}
7777

78-
impl<'a> PartialEq for PopulationTableRowView<'a> {
78+
impl PartialEq for PopulationTableRowView<'_> {
7979
fn eq(&self, other: &Self) -> bool {
8080
self.id == other.id && self.metadata == other.metadata
8181
}
8282
}
8383

84-
impl<'a> Eq for PopulationTableRowView<'a> {}
84+
impl Eq for PopulationTableRowView<'_> {}
8585

86-
impl<'a> PartialEq<PopulationTableRow> for PopulationTableRowView<'a> {
86+
impl PartialEq<PopulationTableRow> for PopulationTableRowView<'_> {
8787
fn eq(&self, other: &PopulationTableRow) -> bool {
8888
self.id == other.id && optional_container_comparison!(self.metadata, other.metadata)
8989
}
@@ -95,7 +95,7 @@ impl PartialEq<PopulationTableRowView<'_>> for PopulationTableRow {
9595
}
9696
}
9797

98-
impl<'a> streaming_iterator::StreamingIterator for PopulationTableRowView<'a> {
98+
impl streaming_iterator::StreamingIterator for PopulationTableRowView<'_> {
9999
type Item = Self;
100100

101101
row_lending_iterator_get!();

src/provenance.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fn make_provenance_row(table: &ProvenanceTable, pos: tsk_id_t) -> Option<Provena
5454
type ProvenanceTableRefIterator<'a> = crate::table_iterator::TableIterator<&'a ProvenanceTable>;
5555
type ProvenanceTableIterator = crate::table_iterator::TableIterator<ProvenanceTable>;
5656

57-
impl<'a> Iterator for ProvenanceTableRefIterator<'a> {
57+
impl Iterator for ProvenanceTableRefIterator<'_> {
5858
type Item = ProvenanceTableRow;
5959

6060
fn next(&mut self) -> Option<Self::Item> {
@@ -96,15 +96,15 @@ impl<'a> ProvenanceTableRowView<'a> {
9696
}
9797
}
9898

99-
impl<'a> PartialEq for ProvenanceTableRowView<'a> {
99+
impl PartialEq for ProvenanceTableRowView<'_> {
100100
fn eq(&self, other: &Self) -> bool {
101101
self.id == other.id && self.timestamp == other.timestamp && self.record == other.record
102102
}
103103
}
104104

105105
impl Eq for ProvenanceTableRowView<'_> {}
106106

107-
impl<'a> PartialEq<ProvenanceTableRow> for ProvenanceTableRowView<'a> {
107+
impl PartialEq<ProvenanceTableRow> for ProvenanceTableRowView<'_> {
108108
fn eq(&self, other: &ProvenanceTableRow) -> bool {
109109
self.id == other.id && self.timestamp == other.timestamp && self.record == other.record
110110
}
@@ -116,7 +116,7 @@ impl PartialEq<ProvenanceTableRowView<'_>> for ProvenanceTableRow {
116116
}
117117
}
118118

119-
impl<'a> streaming_iterator::StreamingIterator for ProvenanceTableRowView<'a> {
119+
impl streaming_iterator::StreamingIterator for ProvenanceTableRowView<'_> {
120120
type Item = Self;
121121

122122
row_lending_iterator_get!();

src/site_table.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn make_site_table_row(table: &SiteTable, pos: tsk_id_t) -> Option<SiteTableRow>
3939
pub(crate) type SiteTableRefIterator<'a> = crate::table_iterator::TableIterator<&'a SiteTable>;
4040
pub(crate) type SiteTableIterator = crate::table_iterator::TableIterator<SiteTable>;
4141

42-
impl<'a> Iterator for SiteTableRefIterator<'a> {
42+
impl Iterator for SiteTableRefIterator<'_> {
4343
type Item = SiteTableRow;
4444

4545
fn next(&mut self) -> Option<Self::Item> {
@@ -80,7 +80,7 @@ impl<'a> SiteTableRowView<'a> {
8080
}
8181
}
8282

83-
impl<'a> PartialEq for SiteTableRowView<'a> {
83+
impl PartialEq for SiteTableRowView<'_> {
8484
fn eq(&self, other: &Self) -> bool {
8585
self.id == other.id
8686
&& crate::util::partial_cmp_equal(&self.position, &other.position)
@@ -89,9 +89,9 @@ impl<'a> PartialEq for SiteTableRowView<'a> {
8989
}
9090
}
9191

92-
impl<'a> Eq for SiteTableRowView<'a> {}
92+
impl Eq for SiteTableRowView<'_> {}
9393

94-
impl<'a> PartialEq<SiteTableRow> for SiteTableRowView<'a> {
94+
impl PartialEq<SiteTableRow> for SiteTableRowView<'_> {
9595
fn eq(&self, other: &SiteTableRow) -> bool {
9696
self.id == other.id
9797
&& crate::util::partial_cmp_equal(&self.position, &other.position)
@@ -109,7 +109,7 @@ impl PartialEq<SiteTableRowView<'_>> for SiteTableRow {
109109
}
110110
}
111111

112-
impl<'a> streaming_iterator::StreamingIterator for SiteTableRowView<'a> {
112+
impl streaming_iterator::StreamingIterator for SiteTableRowView<'_> {
113113
type Item = Self;
114114

115115
row_lending_iterator_get!();

src/tree_interface.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,10 @@ impl TreeInterface {
463463
}
464464
}
465465

466-
/// Return the [`crate::NodeTable`] for this current tree
467-
/// (and the tree sequence from which it came).
468-
///
469-
/// This is a convenience function for accessing node times, etc..
466+
// /// Return the [`crate::NodeTable`] for this current tree
467+
// /// (and the tree sequence from which it came).
468+
// ///
469+
// /// This is a convenience function for accessing node times, etc..
470470
// fn node_table(&self) -> &crate::NodeTable {
471471
// &self.nodes
472472
// }
@@ -664,7 +664,7 @@ impl<'a> PostorderNodeIterator<'a> {
664664
}
665665
}
666666

667-
impl<'a> Iterator for PostorderNodeIterator<'a> {
667+
impl Iterator for PostorderNodeIterator<'_> {
668668
type Item = NodeId;
669669
fn next(&mut self) -> Option<Self::Item> {
670670
match self.current_node_index < self.num_nodes_current_tree {

src/trees/tree.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ pub struct Tree<'treeseq> {
1717
advanced: i32,
1818
}
1919

20-
impl<'treeseq> Deref for Tree<'treeseq> {
20+
impl Deref for Tree<'_> {
2121
type Target = TreeInterface;
2222
fn deref(&self) -> &Self::Target {
2323
&self.api
2424
}
2525
}
2626

27-
impl<'treeseq> DerefMut for Tree<'treeseq> {
27+
impl DerefMut for Tree<'_> {
2828
fn deref_mut(&mut self) -> &mut Self::Target {
2929
&mut self.api
3030
}
@@ -106,7 +106,7 @@ impl<'ts> streaming_iterator::StreamingIterator for Tree<'ts> {
106106
}
107107
}
108108

109-
impl<'ts> streaming_iterator::DoubleEndedStreamingIterator for Tree<'ts> {
109+
impl streaming_iterator::DoubleEndedStreamingIterator for Tree<'_> {
110110
fn advance_back(&mut self) {
111111
assert!(!self.as_ptr().is_null());
112112
// SAFETY: pointer is not null.

0 commit comments

Comments
 (0)