Skip to content

Commit

Permalink
Make sure all doctests and tests in wgpu-types run
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Dec 21, 2022
1 parent eaa87ba commit 9670e9e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ jobs:
run: |
set -e
cargo test --doc
cargo test --doc -p wgpu -p wgpu-core -p wgpu-hal -p wgpu-types
fmt:
name: Format
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
"run-wasm"
]
exclude = []
default-members = ["wgpu", "wgpu-hal", "wgpu-info"]
default-members = ["wgpu", "wgpu-hal", "wgpu-info", "wgpu-types"]

[workspace.package]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/track/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ This allows us to compose the operations to form the various kinds of tracker me
that need to happen in the codebase. For each resource in the given merger, the following
operation applies:
```
```text
UsageScope <- Resource = insert(scope, usage) OR merge(scope, usage)
UsageScope <- UsageScope = insert(scope, scope) OR merge(scope, scope)
CommandBuffer <- UsageScope = insert(buffer.start, buffer.end, scope)
Expand Down
1 change: 1 addition & 0 deletions wgpu-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ bitflags = "1"
serde = { version = "1", features = ["serde_derive"], optional = true }

[dev-dependencies]
serde = { version = "1", features = ["serde_derive"] }
serde_json = "1.0.85"
6 changes: 3 additions & 3 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
)]
#![warn(missing_docs, unsafe_op_in_unsafe_fn)]

#[cfg(feature = "serde")]
#[cfg(any(feature = "serde", test))]
use serde::{Deserialize, Serialize};
use std::hash::{Hash, Hasher};
use std::{num::NonZeroU32, ops::Range};
Expand Down Expand Up @@ -2103,7 +2103,7 @@ pub enum TextureFormat {
},
}

#[cfg(feature = "serde")]
#[cfg(any(feature = "serde", test))]
impl<'de> Deserialize<'de> for TextureFormat {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
Expand Down Expand Up @@ -2239,7 +2239,7 @@ impl<'de> Deserialize<'de> for TextureFormat {
}
}

#[cfg(feature = "serde")]
#[cfg(any(feature = "serde", test))]
impl Serialize for TextureFormat {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
Expand Down

0 comments on commit 9670e9e

Please sign in to comment.