mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 22:41:07 +01:00
Change the field `wgpu_core::device::Queue::raw` from an `Option<A::Queue>` to a `std::mem::ManuallyDrop<A::Queue>`. Replace various `.as_ref().unwrap()` chains with calls to a new accessor function `Queue::raw`. An `Option` is misleading, as this field is always populated during the lifetime of a `Queue`. Instead, we simply have a field whose value needs to be moved in `<Queue as Drop>::drop`; `ManuallyDrop` is the Rust idiom for this situation.