Skip to content

Commit

Permalink
Cargo: clippy --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Jun 22, 2024
1 parent 025ea4f commit fb992b0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/vent-assets/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ impl Model3D {
self.pipelines.drain(..).for_each(|mut pipline| {
unsafe { device.destroy_pipeline(pipline.pipeline, None) };
pipline.materials.drain(..).for_each(|mut model_material| {
model_material.material.diffuse_texture.destroy(&device);
model_material.material.diffuse_texture.destroy(device);
model_material.meshes.drain(..).for_each(|mut mesh| {
mesh.destroy(&device);
mesh.destroy(device);
});
// We are getting an Validation error when we try to free an descriptor set, They will all automatily freed when the Descriptor pool is destroyed
});
Expand Down
9 changes: 7 additions & 2 deletions crates/vent-rendering/src/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
use std::os::raw::c_char;

use ash::{
ext::metal_surface,
khr::{android_surface, surface, wayland_surface, win32_surface, xcb_surface, xlib_surface},
khr::{surface, wayland_surface, xcb_surface, xlib_surface},
prelude::*,
vk, Entry, Instance,
};
Expand Down Expand Up @@ -111,36 +110,42 @@ pub fn enumerate_required_extensions(
display_handle: RawDisplayHandle,
) -> VkResult<&'static [*const c_char]> {
let extensions = match display_handle {
#[cfg(target_os = "windows")]
RawDisplayHandle::Windows(_) => {
const WINDOWS_EXTS: [*const c_char; 2] =
[surface::NAME.as_ptr(), win32_surface::NAME.as_ptr()];
&WINDOWS_EXTS
}

#[cfg(target_os = "linux")]
RawDisplayHandle::Wayland(_) => {
const WAYLAND_EXTS: [*const c_char; 2] =
[surface::NAME.as_ptr(), wayland_surface::NAME.as_ptr()];
&WAYLAND_EXTS
}

#[cfg(target_os = "linux")]
RawDisplayHandle::Xlib(_) => {
const XLIB_EXTS: [*const c_char; 2] =
[surface::NAME.as_ptr(), xlib_surface::NAME.as_ptr()];
&XLIB_EXTS
}

#[cfg(target_os = "linux")]
RawDisplayHandle::Xcb(_) => {
const XCB_EXTS: [*const c_char; 2] =
[surface::NAME.as_ptr(), xcb_surface::NAME.as_ptr()];
&XCB_EXTS
}

#[cfg(target_os = "android")]
RawDisplayHandle::Android(_) => {
const ANDROID_EXTS: [*const c_char; 2] =
[surface::NAME.as_ptr(), android_surface::NAME.as_ptr()];
&ANDROID_EXTS
}

#[cfg(any(target_os = "macos", target_os = "ios"))]
RawDisplayHandle::AppKit(_) | RawDisplayHandle::UiKit(_) => {
const METAL_EXTS: [*const c_char; 2] =
[surface::NAME.as_ptr(), metal_surface::NAME.as_ptr()];
Expand Down
2 changes: 1 addition & 1 deletion crates/vent-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl VentApplication {
// TODO
let mut renderer = DefaultRuntimeRenderer::new(Dimension::D3, &vent_window);

let mut controller = CameraController3D::new(1000.0, 10.0);
let controller = CameraController3D::new(1000.0, 10.0);
let mut delta_time = 0.0;

event_loop.add_window(vent_window);
Expand Down
1 change: 0 additions & 1 deletion crates/vent-window/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use keyboard::{Key, KeyState};
use rwh_06::{DisplayHandle, HasDisplayHandle, HasWindowHandle};
pub mod keyboard;
pub mod mouse;
Expand Down

0 comments on commit fb992b0

Please sign in to comment.