mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 00:11:11 +01:00
Fix Cargo lint from Rust 1.100 (#10576)
This commit is contained in:
1 parent
e6141e25ba
commit
60036cdc0a
18 files changed
+58
-14
No files matched your search
Generated
-2
@@ -2481,7 +2481,6 @@ dependencies = [
|
||||
"naga",
|
||||
"ron",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"spirv",
|
||||
"toml",
|
||||
]
|
||||
@@ -2497,7 +2496,6 @@ dependencies = [
|
||||
"rustc-hash 1.1.0",
|
||||
"serde",
|
||||
"strum 0.28.0",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
+11
-7
@@ -22,11 +22,21 @@ unexpected_cfgs = { level = "warn", check-cfg = [
|
||||
'cfg(feature, values("tracy"))',
|
||||
] }
|
||||
|
||||
# Dependencies used by the library crate
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
anyhow.workspace = true
|
||||
env_logger.workspace = true
|
||||
pico-args.workspace = true
|
||||
profiling.workspace = true
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json.workspace = true
|
||||
termcolor.workspace = true
|
||||
tracy-client = { workspace = true, optional = true }
|
||||
|
||||
# Dependencies used by the benchmark crates
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
||||
bincode = { workspace = true, features = ["serde"] }
|
||||
bytemuck.workspace = true
|
||||
env_logger.workspace = true
|
||||
naga = { workspace = true, features = [
|
||||
"deserialize",
|
||||
"serialize",
|
||||
@@ -41,12 +51,6 @@ naga = { workspace = true, features = [
|
||||
] }
|
||||
naga-test = { workspace = true, features = [] }
|
||||
nanorand.workspace = true
|
||||
pico-args.workspace = true
|
||||
pollster.workspace = true
|
||||
profiling.workspace = true
|
||||
rayon.workspace = true
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json.workspace = true
|
||||
termcolor.workspace = true
|
||||
tracy-client = { workspace = true, optional = true }
|
||||
wgpu.workspace = true
|
||||
@@ -14,6 +14,8 @@ publish = false
|
||||
[lib]
|
||||
path = "lib.rs"
|
||||
|
||||
[lints]
|
||||
|
||||
# We make all dependencies conditional on not being wasm,
|
||||
# so the whole workspace can built as wasm.
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
|
||||
@@ -4,6 +4,9 @@ edition = "2021"
|
||||
rust-version = "1.87"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
env_logger.workspace = true
|
||||
pollster.workspace = true
|
||||
|
||||
@@ -4,6 +4,9 @@ edition = "2021"
|
||||
rust-version = "1.87"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
env_logger.workspace = true
|
||||
pollster.workspace = true
|
||||
|
||||
@@ -4,6 +4,8 @@ edition = "2024"
|
||||
rust-version = "1.87"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
[dependencies]
|
||||
bytemuck = { version = "1.22.0", features = ["extern_crate_alloc"] }
|
||||
env_logger = "0.11"
|
||||
|
||||
@@ -4,6 +4,8 @@ edition = "2024"
|
||||
rust-version = "1.87"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
[dependencies]
|
||||
env_logger = "0.11"
|
||||
pollster = "1.0"
|
||||
|
||||
@@ -4,6 +4,8 @@ edition = "2024"
|
||||
rust-version = "1.87"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
[dependencies]
|
||||
wgpu = "30.0.0"
|
||||
winit = { version = "0.30.8", features = ["android-native-activity"] }
|
||||
|
||||
@@ -4,6 +4,8 @@ edition = "2024"
|
||||
rust-version = "1.87"
|
||||
publish = false
|
||||
|
||||
[lints]
|
||||
|
||||
[features]
|
||||
default = ["web"]
|
||||
web = ["wgpu/web"]
|
||||
|
||||
@@ -31,7 +31,6 @@ spirv = { workspace = true, features = ["deserialize"] }
|
||||
ron.workspace = true
|
||||
toml.workspace = true
|
||||
bitflags.workspace = true
|
||||
serde_json.workspace = true
|
||||
serde.workspace = true
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -27,7 +27,6 @@ hashbrown.workspace = true
|
||||
indexmap.workspace = true
|
||||
rustc-hash.workspace = true
|
||||
serde = { workspace = true, features = ["alloc", "derive"], optional = true }
|
||||
thiserror.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
strum.workspace = true
|
||||
@@ -5,6 +5,11 @@ use once_cell::race::OnceBox;
|
||||
#[cfg(std)]
|
||||
use std::sync::LazyLock;
|
||||
|
||||
#[cfg(std)]
|
||||
// Suppress cargo::unused_dependencies lint (since we can’t express “depend on once_cell
|
||||
// only if not(std)”).
|
||||
use once_cell as _;
|
||||
|
||||
#[cfg(std)]
|
||||
type Inner<T> = LazyLock<T, fn() -> T>;
|
||||
#[cfg(no_std)]
|
||||
|
||||
+5
-2
@@ -88,8 +88,6 @@ trybuild.workspace = true
|
||||
|
||||
# Non-Webassembly
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
# Cargo-metadata doesn't compile on wasm due to old cargo-util-schemas dependency.
|
||||
cargo_metadata.workspace = true
|
||||
env_logger.workspace = true
|
||||
ureq.workspace = true
|
||||
|
||||
@@ -116,6 +114,11 @@ web-sys = { workspace = true, features = [
|
||||
"OffscreenCanvasRenderingContext2d",
|
||||
] }
|
||||
|
||||
# Non-Webassembly Dev Dependencies
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
||||
# Cargo-metadata doesn't compile on wasm due to old cargo-util-schemas dependency.
|
||||
cargo_metadata.workspace = true
|
||||
|
||||
[lints.clippy]
|
||||
bool_assert_comparison = "allow"
|
||||
disallowed_types = "allow"
|
||||
|
||||
@@ -14,6 +14,9 @@ license.workspace = true
|
||||
# See the repo README for more information on MSRV policy.
|
||||
rust-version = "1.87"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
@@ -28,7 +28,7 @@ const _: () = {
|
||||
#[repr(transparent)]
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[serde(into = "SerialId", try_from = "SerialId")]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct RawId(NonZeroU64);
|
||||
|
||||
impl RawId {
|
||||
@@ -70,6 +70,7 @@ impl From<RawId> for SerialId {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ZeroIdError;
|
||||
|
||||
impl fmt::Display for ZeroIdError {
|
||||
|
||||
@@ -24,6 +24,9 @@ targets = [
|
||||
"wasm32-unknown-unknown",
|
||||
]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
## Enables serialization via `serde` on common wgpu types.
|
||||
serde = ["dep:serde", "wgpu-types/serde", "wgpu-core/serde"]
|
||||
|
||||
@@ -84,6 +84,7 @@ flagged as errors as well. This is called [Contagious Invalidity].
|
||||
*/
|
||||
|
||||
use alloc::sync::Arc;
|
||||
use core::fmt;
|
||||
|
||||
use crate::registry::Registry;
|
||||
use wgpu_core::{
|
||||
@@ -140,6 +141,15 @@ pub struct Hub {
|
||||
pub(crate) render_bundle_encoders: Registry<RenderBundleEncoder>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for Hub {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
// Placeholder impl just so that Debug is always implemented, even though not all of our
|
||||
// fields implement Debug.
|
||||
// If you find a need for printing actual data here, feel free to add it.
|
||||
f.debug_struct("Hub").finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
impl Hub {
|
||||
pub(crate) fn new() -> Self {
|
||||
Self {
|
||||
|
||||
@@ -15,6 +15,9 @@ readme = "README.md"
|
||||
# whole, if their code permits. See `../README.md` for details.
|
||||
rust-version = "1.87"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[features]
|
||||
gles = ["wgpu-hal/gles"]
|
||||
vulkan = ["wgpu-hal/vulkan"]
|
||||
|
||||
Reference in new issue
Block a user