Skip to content

Commit

Permalink
Fix cid serde feature reference (#235)
Browse files Browse the repository at this point in the history
* Fix cid serde feature

* Add CI check for Forest binary
  • Loading branch information
austinabell authored Feb 20, 2020
1 parent b598ffc commit 1411572
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion blockchain/blocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions ipld/cid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl Default for Cid {
}
}

#[cfg(feature = "serde")]
#[cfg(feature = "serde_derive")]
impl ser::Serialize for Cid {
fn serialize<S>(&self, s: S) -> Result<S::Ok, S::Error>
where
Expand All @@ -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<D>(deserializer: D) -> Result<Self, D::Error>
where
Expand Down

0 comments on commit 1411572

Please sign in to comment.