Allow clippy::pattern_type_mismatch in hal

For the same reasons we allow it in core.
This commit is contained in:
Nicolas Silva committed 2024-06-25 15:11:47 +02:00
1 parent bfcb5457c6
commit e92e543b7b
3 files changed
+7 -9

No files matched your search

+3 -3
View File
@@ -762,8 +762,8 @@ impl crate::Surface for Surface {
};
match &self.target {
&SurfaceTarget::WndHandle(_) | &SurfaceTarget::SurfaceHandle(_) => {}
&SurfaceTarget::Visual(ref visual) => {
SurfaceTarget::WndHandle(_) | &SurfaceTarget::SurfaceHandle(_) => {}
SurfaceTarget::Visual(visual) => {
if let Err(err) =
unsafe { visual.SetContent(swap_chain1.as_unknown()) }.into_result()
{
@@ -773,7 +773,7 @@ impl crate::Surface for Surface {
));
}
}
&SurfaceTarget::SwapChainPanel(ref swap_chain_panel) => {
SurfaceTarget::SwapChainPanel(swap_chain_panel) => {
if let Err(err) =
unsafe { swap_chain_panel.SetSwapChain(swap_chain1.as_ptr()) }
.into_result()
+3 -5
View File
@@ -227,17 +227,15 @@
clippy::non_send_fields_in_send_ty,
// TODO!
clippy::missing_safety_doc,
// Clashes with clippy::pattern_type_mismatch
clippy::needless_borrowed_reference,
// It gets in the way a lot and does not prevent bugs in practice.
clippy::pattern_type_mismatch,
)]
#![warn(
trivial_casts,
trivial_numeric_casts,
unsafe_op_in_unsafe_fn,
unused_extern_crates,
unused_qualifications,
// We don't match on a reference, unless required.
clippy::pattern_type_mismatch,
unused_qualifications
)]
/// DirectX12 API internals.
+1 -1
View File
@@ -1342,7 +1342,7 @@ impl crate::Device for super::Device {
.iter()
.find(|&&(value, _)| value >= wait_value)
{
Some(&(_, ref cmd_buf)) => cmd_buf,
Some((_, cmd_buf)) => cmd_buf,
None => {
log::error!("No active command buffers for fence value {}", wait_value);
return Err(crate::DeviceError::Lost);