mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 09:34:09 +01:00
Allow clippy::pattern_type_mismatch in hal
For the same reasons we allow it in core.
This commit is contained in:
1 parent
bfcb5457c6
commit
e92e543b7b
3 files changed
+7
-9
No files matched your search
@@ -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
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user