1
0
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:
Nicole L
2025-07-25 02:10:31 -07:00
committed by GitHub
parent c4985cbf27
commit f37402066d

View File

@ -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);
}
}