From 1411572878232debf9efe21e84e9b94db7ad7c12 Mon Sep 17 00:00:00 2001 From: Austin Abell Date: Thu, 20 Feb 2020 10:03:10 -0500 Subject: [PATCH] Fix cid serde feature reference (#235) * Fix cid serde feature * Add CI check for Forest binary --- .github/workflows/ci-rust.yml | 6 ++++++ blockchain/blocks/Cargo.toml | 2 +- ipld/cid/src/lib.rs | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index bec989aace50..579e495fa7d4 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -88,6 +88,12 @@ jobs: command: clippy args: -- -D warnings + - name: Check forest binary + uses: actions-rs/cargo@v1 + with: + command: check + args: -p forest + publish_docs: if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' name: Publish Documentation diff --git a/blockchain/blocks/Cargo.toml b/blockchain/blocks/Cargo.toml index 586ad117e429..27902b78f31f 100644 --- a/blockchain/blocks/Cargo.toml +++ b/blockchain/blocks/Cargo.toml @@ -9,7 +9,7 @@ address = { package = "forest_address", path = "../../vm/address" } crypto = { path = "../../crypto" } message = { package = "forest_message", path = "../../vm/message" } clock = { path = "../../node/clock" } -cid = { package = "forest_cid", path = "../../ipld/cid" } +cid = { package = "forest_cid", path = "../../ipld/cid", features = ["serde_derive"] } derive_builder = "0.9" serde = { version = "1.0", features = ["derive"] } encoding = { package = "forest_encoding", path = "../../encoding" } diff --git a/ipld/cid/src/lib.rs b/ipld/cid/src/lib.rs index 0e4b66adde27..5100d73fabd0 100644 --- a/ipld/cid/src/lib.rs +++ b/ipld/cid/src/lib.rs @@ -57,7 +57,7 @@ impl Default for Cid { } } -#[cfg(feature = "serde")] +#[cfg(feature = "serde_derive")] impl ser::Serialize for Cid { fn serialize(&self, s: S) -> Result where @@ -74,7 +74,7 @@ impl ser::Serialize for Cid { } } -#[cfg(feature = "serde")] +#[cfg(feature = "serde_derive")] impl<'de> de::Deserialize<'de> for Cid { fn deserialize(deserializer: D) -> Result where