mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-23 00:01:16 -03:00
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:
committed by
Johannes Altmanninger
parent
ec77c34ebe
commit
831411ddd5
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user