Skip to content

Commit f374020

Browse files
authored
Remove unnecessary type cast in C ffi example (#2783)
A `&T` can automatically coerce to a `*const T`, so the manual cast isn't necessary here.
1 parent c4985cb commit f374020

File tree

1 file changed

+1
-1
lines changed
  • src/android/interoperability/with-c/bindgen

1 file changed

+1
-1
lines changed

src/android/interoperability/with-c/bindgen/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ fn main() {
2525
// remains valid. `print_card` doesn't store either pointer to use later
2626
// after it returns.
2727
unsafe {
28-
print_card(&card as *const card);
28+
print_card(&card);
2929
}
3030
}

0 commit comments

Comments
 (0)