Mutable reference to isize conversion and in reverse soundness
The Rust Programming Language Forum
Mutable reference to isize conversion and in reverse soundness
let installed_apps = platform::list_installed_apps(); let running_apps_offset = installed_apps.len(); let mut incorporable_apps = Self { inner: installed_apps, running_apps_offset }; // SAFETY: The mutable reference to `incorporable_apps` is created inside the function argument, // therefore it gets moved into the function. unsafe { platform::list_running_apps(&mut incorporable_apps); } incorporable_apps.inner.shrink_to_fit(); incorporable_apps // SAFETY: `incorporable_apps` (th...
0 comments
No comments yet.