mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
remove unnecessary question mark operator and unsafe block (#1940)
This commit is contained in:
parent
4980ee4317
commit
c0c9c21ce4
@ -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),*],
|
||||
)?)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 )*
|
||||
])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user