Skip to content

Commit ea1afe0

Browse files
committed
clippy fix ptr_eq
1 parent 30fd2b6 commit ea1afe0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hugr-persistent/src/walker.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,7 @@ impl<R: Resolver> Walker<'_, R> {
451451
// Check walker equality by comparing pointers to the state space and
452452
// other fields. Only for testing purposes.
453453
fn ptr_eq(&self, other: &Self) -> bool {
454-
self.state_space.as_ref() as *const CommitStateSpace<R>
455-
== other.state_space.as_ref() as *const CommitStateSpace<R>
454+
std::ptr::eq(self.state_space.as_ref(), other.state_space.as_ref())
456455
&& self.pinned_nodes == other.pinned_nodes
457456
&& BTreeSet::from_iter(self.selected_commits.all_commit_ids())
458457
== BTreeSet::from_iter(other.selected_commits.all_commit_ids())

0 commit comments

Comments
 (0)