Skip to content

Commit

Permalink
fix: clippy warns
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Dec 16, 2024
1 parent 3a7e47c commit 4395831
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/vent-assets/src/model/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl ModelLoader {
}
.unwrap();

let shader_entry_name = unsafe { c"main" };
let shader_entry_name = c"main";
let shader_stage_create_info = [
vk::PipelineShaderStageCreateInfo {
module: vertex_module,
Expand Down
2 changes: 1 addition & 1 deletion crates/vent-assets/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Model3D {
}

/// So your ideal render loop would be
///
/// For each pipeline
/// Set pipeline
/// For each material that uses pipeline
Expand Down
2 changes: 1 addition & 1 deletion crates/vent-rendering/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub fn get_validation_features() -> vk::ValidationFeaturesEXT<'static> {
// vk::ValidationFeatureEnableEXT::BEST_PRACTICES, Does hide real errors, so lets disable it for now
vk::ValidationFeatureEnableEXT::SYNCHRONIZATION_VALIDATION,
])
.disabled_validation_features(&[])// We need to give it an empty Array, If not we get an validation error
.disabled_validation_features(&[]) // We need to give it an empty Array, If not we get an validation error
}

/// Setup the debug message if validation layers are enabled.
Expand Down
5 changes: 2 additions & 3 deletions crates/vent-rendering/src/mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ use crate::{
};

/// This is a simple mesh that consists of vertices and indices. It is useful when you need to hard-code 3D data into your application.
///
/// By using this simple mesh, you can easily define custom shapes or provide default objects for your application. It is particularly handy when you want to avoid loading external model files and instead directly embed the 3D data within your code.
///
/// Note that this simple mesh implementation does not support advanced features such as normal mapping, skeletal animation, or material properties. It serves as a basic foundation for representing 3D geometry and can be extended or customized according to your specific requirements.
pub struct Mesh3D {
vertex_buf: VulkanBuffer,
index_buf: VulkanBuffer,
Expand Down
2 changes: 1 addition & 1 deletion crates/vent-rendering/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl VulkanPipeline {
}
.unwrap();

let shader_entry_name = unsafe { c"main" };
let shader_entry_name = c"main";
let shader_stage_create_info = [
vk::PipelineShaderStageCreateInfo {
module: vertex_module,
Expand Down
6 changes: 3 additions & 3 deletions crates/vent-runtime/src/util/crash.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use chrono::{DateTime, Local};
use std::fs::File;
use std::io::Write;
use std::panic::{self, PanicInfo};
use std::panic::{self, PanicHookInfo};
use sysinfo::System;

// Crash Handler
Expand All @@ -11,13 +11,13 @@ pub fn init_panic_hook() {
panic::set_hook(Box::new(panic_handler));
}

fn panic_handler(pi: &PanicInfo) {
fn panic_handler(pi: &PanicHookInfo) {
eprintln!("Crash: {}", pi);
log_crash(pi).expect("Failed to Log Crash File");
// show_error_dialog(pi);
}

fn log_crash(pi: &PanicInfo) -> std::io::Result<()> {
fn log_crash(pi: &PanicHookInfo) -> std::io::Result<()> {
let timestamp: DateTime<Local> = Local::now();

let sys = System::new_all();
Expand Down

0 comments on commit 4395831

Please sign in to comment.