Make Surface::as_hal take an immutable reference. (#6500)

This commit is contained in:
Jerzy Wilczek authored and GitHub committed 2024-11-06 15:47:25 +01:00
1 parent 5936fe58f4
commit 9b47b06a4f
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -54,6 +54,10 @@ Bottom level categories:
### Changes
#### General
- Make `Surface::as_hal` take an immutable reference to the surface. By @jerzywilczek in [#9999](https://github.com/gfx-rs/wgpu/pull/9999)
#### HAL
- Change the `DropCallback` API to use `FnOnce` instead of `FnMut`. By @jerzywilczek in [#6482](https://github.com/gfx-rs/wgpu/pull/6482)
+1 -1
View File
@@ -159,7 +159,7 @@ impl Surface<'_> {
/// - The raw handle obtained from the hal Surface must not be manually destroyed
#[cfg(wgpu_core)]
pub unsafe fn as_hal<A: wgc::hal_api::HalApi, F: FnOnce(Option<&A::Surface>) -> R, R>(
&mut self,
&self,
hal_surface_callback: F,
) -> Option<R> {
self.context