diff --git a/Cargo.toml b/Cargo.toml index 108ef6c15..0d1d646ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,3 @@ [workspace] -members = [ - "examples", - "vulkano", - "vulkano-macros", - "vulkano-shaders", - "vulkano-util", - "vulkano-win", -] +members = ["examples", "vulkano", "vulkano-macros", "vulkano-shaders", "vulkano-util", "vulkano-win"] +resolver = "2" diff --git a/examples/src/bin/simple-particles.rs b/examples/src/bin/simple-particles.rs index 68cbaf4ca..482d815d3 100644 --- a/examples/src/bin/simple-particles.rs +++ b/examples/src/bin/simple-particles.rs @@ -508,7 +508,8 @@ fn main() { .unwrap() }; - let mut fences: Vec>>> = vec![None; framebuffers.len()]; + let mut fences: Vec>> = + (0..framebuffers.len()).map(|_| None).collect(); let mut previous_fence_index = 0u32; let start_time = SystemTime::now(); @@ -566,7 +567,7 @@ fn main() { // If the previous image has a fence then use it for synchronization, else create // a new one. - let previous_future = match fences[previous_fence_index as usize].clone() { + let previous_future = match fences[previous_fence_index as usize].take() { // Ensure current frame is synchronized with previous. Some(fence) => fence.boxed(), // Create new future to guarentee synchronization with (fake) previous frame. @@ -629,7 +630,7 @@ fn main() { // Update this frame's future with current fence. fences[image_index as usize] = match future.map_err(Validated::unwrap) { // Success, store result into vector. - Ok(future) => Some(Arc::new(future)), + Ok(future) => Some(future), // Unknown failure. Err(e) => panic!("failed to flush future: {e}"), diff --git a/vulkano-util/src/window.rs b/vulkano-util/src/window.rs index fc014ffcb..1a2556a47 100644 --- a/vulkano-util/src/window.rs +++ b/vulkano-util/src/window.rs @@ -150,7 +150,7 @@ impl VulkanoWindows { match winit_window.set_cursor_grab(CursorGrabMode::Confined) { Ok(_) => {} Err(winit::error::ExternalError::NotSupported(_)) => {} - Err(err) => Err(err).unwrap(), + Err(err) => panic!("{:?}", err), } } diff --git a/vulkano/autogen/features.rs b/vulkano/autogen/features.rs index 2fe39cca1..59f235234 100644 --- a/vulkano/autogen/features.rs +++ b/vulkano/autogen/features.rs @@ -483,7 +483,7 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream { fn features_members(types: &HashMap<&str, (&Type, Vec<&str>)>) -> Vec { let mut features = HashMap::default(); std::iter::once(&types["VkPhysicalDeviceFeatures"]) - .chain(sorted_structs(types).into_iter()) + .chain(sorted_structs(types)) .filter(|(ty, _)| { ty.name.as_deref() == Some("VkPhysicalDeviceFeatures") || ty.structextends.as_deref() diff --git a/vulkano/autogen/formats.rs b/vulkano/autogen/formats.rs index a0dad3a6e..1bfddc991 100644 --- a/vulkano/autogen/formats.rs +++ b/vulkano/autogen/formats.rs @@ -810,7 +810,7 @@ fn formats_members( // cgmath only has 1, 2, 3 and 4-component vector types. // Fall back to arrays for anything else. - if matches!(component_count, 1 | 2 | 3 | 4) { + if matches!(component_count, 1..=4) { let ty = format_ident!("{}", format!("Vector{}", component_count)); member.type_cgmath = Some(quote! { cgmath::#ty<#component_type> }); } diff --git a/vulkano/autogen/properties.rs b/vulkano/autogen/properties.rs index 1212dbafb..b3e58bc9e 100644 --- a/vulkano/autogen/properties.rs +++ b/vulkano/autogen/properties.rs @@ -147,7 +147,7 @@ fn properties_members(types: &HashMap<&str, (&Type, Vec<&str>)>) -> Vec