diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ae31059..67c23daa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,14 @@ jobs: - run: cargo fmt --check - run: cargo clippy --workspace --all-targets --locked -- -D warnings + + # A contract module that isn't re-exported leaves the contract struct, + # its generated Client and every helper it calls unreachable, which + # surfaces as dead_code warnings on a plain library build. + - name: Build without dead_code warnings + env: + RUSTFLAGS: "-D dead_code" + run: cargo build --workspace --locked - run: cargo test --workspace --locked - name: Security audit diff --git a/contracts/milestones/src/lib.rs b/contracts/milestones/src/lib.rs index 8c17e9c9..46d6a7c7 100644 --- a/contracts/milestones/src/lib.rs +++ b/contracts/milestones/src/lib.rs @@ -1170,6 +1170,8 @@ mod contract { } } // mod contract +pub use contract::*; + /// Pays each contributor their share of `milestone.remaining_budget` (the /// unallocated remainder of the pool), computed as /// `remaining_budget * contribution.amount / total_budget` — i.e. in