You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-08-08 00:12:51 +02:00
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.
This commit is contained in:
@ -25,6 +25,6 @@ fn main() {
|
||||
// remains valid. `print_card` doesn't store either pointer to use later
|
||||
// after it returns.
|
||||
unsafe {
|
||||
print_card(&card as *const card);
|
||||
print_card(&card);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user