wgpu/tests
Erich Gubler 21c7092762
Satisfy latest clippy lints (up to Rust 1.64) (#2081)
* refactor: satisfy `clippy::borrow_deref_ref`

* chore: satisfy `clippy::ptr_arg`

* refactor: satisfy `clippy::needless_update`

* chore: `allow(clippy::too_many_arguments)` on `write_output_glsl` test

Since this is test code, I don't think there's a strong impetus to refactor types to consolidate
or otherwise alter arguments here. Let's just `allow` this.

* refactor: satisfy `clippy::single_match`

I think it's sixes whether to keep this code as-is or to `allow(...)` as-is. 🤷🏻‍♂️

* refactor: satisfy `clippy::single_char_pattern`

* refactor: satisfy `clippy::reversed_empty_ranges`

The lint fires because it generally doesn't make sense to use a `Range` built this way; [upstream
`Range` docs]) states:

> It is empty if `start >= end`.

`clippy` wants to help us from naively iterating over a `Range` like this! Thanks, `clippy`!
However, we're not actually using the offending `addresses` variables for iteration. We're using
them as a flat data structure with fields that happen to conceptually match. We can, therefore,
sidestep this lint by "just" inlining into separate variables for start and end instead.

[upstream `Range` docs]: https://doc.rust-lang.org/stable/std/ops/struct.Range.html

* refactor: satisfy `clippy::pattern_type_mismatch`

* chore: `allow(clippy::panic)` for `test`

We definitely should let `panic!(...)` calls exist in `cfg(test)`! It's a very standard way to fail
`#[test]` functions. It seems that previous test authors agree! 😅

* fixup! refactor: satisfy `clippy::pattern_type_mismatch`

* fixup! refactor: satisfy `clippy::single_match`
2022-11-03 09:32:15 -07:00
..
in Fix incorrect atomic bounds check on metal back-end (#2099) 2022-10-24 09:20:57 -07:00
out Fix textureGather compatibility on macOS 10.13 (#2104) 2022-10-27 09:28:46 +02:00
snapshots.rs Satisfy latest clippy lints (up to Rust 1.64) (#2081) 2022-11-03 09:32:15 -07:00
spirv-capabilities.rs [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
wgsl-errors.rs refactor(valid): s/error/source member name for ValidationError 2022-10-26 16:31:48 -04:00