fix: clippy::ref_as_ptr

https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr

Part of #12136
This commit is contained in:
xtqqczze
2025-12-10 20:58:00 +00:00
committed by Johannes Altmanninger
parent ec77c34ebe
commit 831411ddd5
7 changed files with 12 additions and 14 deletions

View File

@@ -2208,7 +2208,7 @@ fn test_line_counter() {
assert_eq!(line_counter.line_offset_of_node(), None);
for (idx, &node) in pipelines.iter().enumerate() {
line_counter.node = node as *const _;
line_counter.node = std::ptr::from_ref(node);
assert_eq!(
line_counter.source_offset_of_node(),
Some(node.source_range().start())
@@ -2217,7 +2217,7 @@ fn test_line_counter() {
}
for (idx, &node) in pipelines.iter().enumerate().rev() {
line_counter.node = node as *const _;
line_counter.node = std::ptr::from_ref(node);
assert_eq!(
line_counter.source_offset_of_node(),
Some(node.source_range().start())