Run cargo fmt
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s

This commit is contained in:
Florian RICHER 2024-11-16 22:45:22 +01:00
parent bc94b68c0c
commit e9ce480f96
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
10 changed files with 175 additions and 136 deletions

View file

@ -24,14 +24,15 @@ impl Window {
}
pub fn required_extensions(&self) -> anyhow::Result<Vec<*const c_char>> {
let display_handle = self.handle
let display_handle = self
.handle
.as_ref()
.ok_or_else(|| anyhow::anyhow!("Window not found"))?
.display_handle()?;
#[allow(unused_mut)]
let mut extension_names = ash_window::enumerate_required_extensions(display_handle.as_raw())?
.to_vec();
let mut extension_names =
ash_window::enumerate_required_extensions(display_handle.as_raw())?.to_vec();
// TODO: Move this because is not related to Window extensions
#[cfg(any(target_os = "macos", target_os = "ios"))]
@ -55,7 +56,7 @@ impl Window {
pub fn request_redraw(&self) {
match self.handle.as_ref() {
Some(window) => window.request_redraw(),
None => log::warn!("Redraw requested but no window found")
None => log::warn!("Redraw requested but no window found"),
}
}
}