Clean up after combination of #6634 and #6635. (#6640)

We can now cast directly from `T*` to `U*`; stop going via `void*`. Also
remove the conversion impl from `void*` as it's now subsumed by the
general impl.
This commit is contained in:
Richard Smith
2026-01-21 21:03:35 +00:00
committed by GitHub
parent c9dbf40f11
commit a2e4c31e8e
3 changed files with 27 additions and 31 deletions
+1 -3
View File
@@ -51,9 +51,7 @@ fn Run() -> i32 {
let port: u16 = 8081;
address.sin6_port = Cpp.htons_wrap(port);
// TODO: Should be able to cast directly.
let address_ptr: Cpp.sockaddr* =
(&address as Cpp.void*) unsafe as Cpp.sockaddr*;
let address_ptr: Cpp.sockaddr* = &address unsafe as Cpp.sockaddr*;
// TODO: Should have an implicit conversion from
// T* to Optional(const T*).
// TODO: Should expose `sizeof` somehow.