remove unnecessary question mark operator and unsafe block (#1940)

This commit is contained in:
Austin Johnson 2022-08-01 03:43:45 -05:00 committed by GitHub
parent 4980ee4317
commit c0c9c21ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -272,14 +272,14 @@ where
static WORDS: &[u32] = &[ #( #words ),* ];
unsafe {
Ok(::vulkano::shader::ShaderModule::from_words_with_data(
::vulkano::shader::ShaderModule::from_words_with_data(
device,
WORDS,
#spirv_version,
[#(#spirv_capabilities),*],
[#(#spirv_extensions),*],
[#(#entry_points),*],
)?)
)
}
}

View File

@ -340,10 +340,8 @@ fn write_interface(interface: &ShaderInterface) -> TokenStream {
);
quote! {
unsafe {
::vulkano::shader::ShaderInterface::new_unchecked(vec![
#( #items )*
])
}
::vulkano::shader::ShaderInterface::new_unchecked(vec![
#( #items )*
])
}
}