Skip to content

Commit

Permalink
Fix borrow_as_ptr lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Jan 9, 2025
1 parent 59a43e1 commit 5f70130
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ used_underscore_binding = "allow"
wildcard_imports = "allow"

# TODO
borrow_as_ptr = "allow"
match_same_arms = "allow"
trivially_copy_pass_by_ref = "allow"
needless_pass_by_value = "allow"
Expand Down
2 changes: 1 addition & 1 deletion bindgen/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ impl Cursor {
where
Visitor: FnMut(Cursor) -> CXChildVisitResult,
{
let data = &mut visitor as *mut Visitor;
let data = ptr::addr_of_mut!(visitor);
unsafe {
clang_visitChildren(self.x, visit_children::<Visitor>, data.cast());
}
Expand Down

0 comments on commit 5f70130

Please sign in to comment.