Skip to content

Commit 587ddc9

Browse files
Merge pull request #178 from billf/fix-serde
chore(serde): fix conditional compilation
2 parents ac1806c + 517651c commit 587ddc9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ jobs:
3939
rustup default stable
4040
shell: bash
4141
- name: Build without default features
42-
run: cargo check --no-default-features
42+
run: cargo check --workspace --no-default-features
4343
- name: Build the `wat` feature
44-
run: cargo check --no-default-features --features wat
44+
run: cargo check --workspace --no-default-features --features wat
4545
- name: Build the `wit` feature
46-
run: cargo check --no-default-features --features wit
46+
run: cargo check --workspace --no-default-features --features wit
4747
- name: Build the `registry` feature
48-
run: cargo check --no-default-features --features registry
48+
run: cargo check --workspace --no-default-features --features registry
49+
- name: Build the `serde` feature
50+
run: cargo check --workspace --no-default-features --features serde
4951
- name: Build all features
50-
run: cargo check --all-features
52+
run: cargo check --workspace --all-features
5153

5254
rustfmt:
5355
name: Format source code

crates/wac-types/src/component.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl fmt::Display for WorldId {
100100
pub struct ModuleTypeId(Id<ModuleType>);
101101

102102
#[cfg(feature = "serde")]
103-
impl serde::Serialize for ModuleId {
103+
impl serde::Serialize for ModuleTypeId {
104104
fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
105105
self.0.index().serialize(serializer)
106106
}

0 commit comments

Comments
 (0)