Commit 4a5e5be
committed
bevy_render: dropped texture view is not Drop in wasm (#22303)
# Objective
- `cargo clippy --no-deps --package bevy_render --target
wasm32-unknown-unknown` fails:
```
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
--> crates/bevy_render/src/view/window/mod.rs:416:13
|
416 | drop(window.swap_chain_texture_view.take());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: argument has type `std::option::Option<render_resource::texture::TextureView>`
--> crates/bevy_render/src/view/window/mod.rs:416:18
|
416 | drop(window.swap_chain_texture_view.take());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#drop_non_drop
= note: `#[warn(clippy::drop_non_drop)]` on by default
warning: `bevy_render` (lib) generated 1 warning
```
## Solution
- Expect the lint in wasm. It's not an actual problem, and special
casing for wasm wouldn't be better1 parent 38aad49 commit 4a5e5be
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
416 | 420 | | |
417 | 421 | | |
418 | 422 | | |
| |||
0 commit comments