Skip to content

Commit

Permalink
extensions/khr/device_group_creation: Take borrow of Entry in new()
Browse files Browse the repository at this point in the history
Looks like #630 typo'd the argument for `DeviceGroupCreation::new()` by
unnecessarily requiring a move (`Clone`) of `Entry` just to call
`get_instance_proc_addr()` on it.  Replace this with a borrow to match
all other extensions.
  • Loading branch information
MarijnS95 committed May 6, 2023
1 parent 1374996 commit d8ba5f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `ExternalMemoryFd::get_memory_fd_properties()`
- `ExternalMemoryWin32::get_memory_win32_handle_properties()`
- `GetSurfaceCapabilities2::get_physical_device_surface_capabilities2()`
- `VK_KHR_device_group_creation`: Take borrow of `Entry` in `fn new()` (#753)

### Removed

Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/khr/device_group_creation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct DeviceGroupCreation {
}

impl DeviceGroupCreation {
pub fn new(entry: Entry, instance: &Instance) -> Self {
pub fn new(entry: &Entry, instance: &Instance) -> Self {
let handle = instance.handle();
let fp = vk::KhrDeviceGroupCreationFn::load(|name| unsafe {
mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr()))
Expand Down

0 comments on commit d8ba5f4

Please sign in to comment.