Skip to content

Commit 9b47b06

Browse files
authored
Make Surface::as_hal take an immutable reference. (#6500)
1 parent 5936fe5 commit 9b47b06

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ Bottom level categories:
5454

5555
### Changes
5656

57+
#### General
58+
59+
- Make `Surface::as_hal` take an immutable reference to the surface. By @jerzywilczek in [#9999](https://github.com/gfx-rs/wgpu/pull/9999)
60+
5761
#### HAL
5862

5963
- Change the `DropCallback` API to use `FnOnce` instead of `FnMut`. By @jerzywilczek in [#6482](https://github.com/gfx-rs/wgpu/pull/6482)

wgpu/src/api/surface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl Surface<'_> {
159159
/// - The raw handle obtained from the hal Surface must not be manually destroyed
160160
#[cfg(wgpu_core)]
161161
pub unsafe fn as_hal<A: wgc::hal_api::HalApi, F: FnOnce(Option<&A::Surface>) -> R, R>(
162-
&mut self,
162+
&self,
163163
hal_surface_callback: F,
164164
) -> Option<R> {
165165
self.context

0 commit comments

Comments
 (0)