Skip to content

Commit

Permalink
Make Surface::as_hal take an immutable reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzywilczek committed Nov 6, 2024
1 parent 5936fe5 commit 34c0e63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion wgpu/src/api/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34c0e63

Please sign in to comment.