Skip to content

Commit

Permalink
Upgrade raw-window-handle to 0.3.4
Browse files Browse the repository at this point in the history
Supports both 0.3.x and 0.4.x in terms of the HasRawWindowHandle trait
ash-rs/ash#553
  • Loading branch information
temportalflux committed Apr 16, 2022
1 parent 4897ee0 commit cbb93ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vulkan/Cargo.toml
Expand Up @@ -17,7 +17,7 @@ ash-window = "0.6"
bytemuck = "1.7"
log = "0.4.14"
profiling = "1.0"
raw-window-handle = "0.3.3"
raw-window-handle = "0.3.4"
# vk-mem support has been discontinued and does not support ash >=0.33
# https://github.com/gwihlidal/vk-mem-rs/issues/54
# https://github.com/adrien-ben/imgui-rs-vulkan-renderer/issues/16
Expand Down
5 changes: 1 addition & 4 deletions vulkan/src/instance/info.rs
Expand Up @@ -93,10 +93,7 @@ impl Info {
}

/// Sets the window
pub fn set_window(
mut self,
window_handle: &impl raw_window_handle::HasRawWindowHandle,
) -> Self {
pub fn set_window(mut self, window_handle: &dyn raw_window_handle::HasRawWindowHandle) -> Self {
let window_extensions = ash_window::enumerate_required_extensions(window_handle).unwrap();
self.append_raw_extensions(window_extensions.iter().map(|cstr| cstr.as_ptr()).collect());
self
Expand Down
2 changes: 1 addition & 1 deletion vulkan/src/instance/instance.rs
Expand Up @@ -52,7 +52,7 @@ impl Instance {
pub fn create_surface(
context: &Context,
instance: &sync::Arc<Self>,
handle: &impl raw_window_handle::HasRawWindowHandle,
handle: &dyn raw_window_handle::HasRawWindowHandle,
) -> utility::Result<Surface> {
Ok(
unsafe {
Expand Down

0 comments on commit cbb93ea

Please sign in to comment.