Repository navigation
Conversation
The CI workflow left out `cargo fmt --check` and `cargo clippy` because both failed on main. The formatter wanted one statement in build.rs joined onto a single line. Clippy reported 21 double_must_use warnings, all in the generated bindings, where async_trait expands each server trait method into a must_use function that returns a must_use future. This change formats build.rs. It allows clippy::double_must_use on the rpc module that includes the generated file, because that file is generator output and the bindings job rejects any hand edit to it. The allow covers that one lint on that one module, so every other lint still applies to the generated code. With both tools clean, the check-and-test job now runs `cargo fmt --check` and `cargo clippy --all-targets -- --deny warnings`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`cargo package --list` showed two files in the published package that no user of the crate can use. The Makefile drives `git subtree pull`, which works only in a clone of the repository. The file from_darkside_tests_build.rs is a build script copied from another repository; it names proto paths that do not exist here, and nothing compiles it. This change adds both files to the exclude list in Cargo.toml. Both stay in the repository. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Neither crate root declared a position on unsafe code. The library holds only generated prost and tonic bindings and three re-exports, and the build script only invokes the generator, so neither needs unsafe. This change adds `#![forbid(unsafe_code)]` to src/lib.rs and to build.rs. The attribute is forbid, not deny, so no inner scope can override it. The generated bindings compile under it, which shows that they contain no unsafe block. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This pull request is a follow-up to PR #8 "feat: expose GetStandardFee (upstream v0.6.0); bump to 0.5.0". It makes three changes, one in each commit. It does not change the public API of the crate.
Format gate and lint gate in CI
The job
check and testnow runscargo fmt --check. It also runscargo clippy --all-targets -- --deny warnings.Both commands failed on
mainbefore this change. The formatter changed one statement inbuild.rs. Clippy reported 21double_must_usewarnings. All 21 warnings are in the generated bindings, which must not be edited by hand. Therpcmodule insrc/lib.rsnow has#[allow(clippy::double_must_use)]. The attribute permits that one lint on that one module only.Package contents
Cargo.tomlnow excludesMakefileandfrom_darkside_tests_build.rsfrom the published package. The Makefile works only in a clone of the repository. The filefrom_darkside_tests_build.rsis not compiled, and it names proto paths that do not exist in this repository. Both files stay in the repository.The file
darksiderpc/darkside.protois still in the package. This pull request does not change that.Unsafe code
src/lib.rsandbuild.rsnow start with#![forbid(unsafe_code)]. The generated bindings compile with this attribute.Verification
All steps of the two CI jobs pass locally on this branch.
cargo fmt --checkpasses.cargo check --locked --all-targetspasses.cargo clippy --locked --all-targets -- --deny warningspasses.cargo nextest run --lockedpasses with 4 tests.cargo build --locked --features rebuild-protoleavessrc/generatedunchanged.cargo package --listshows that the two excluded files are no longer in the package.🤖 Generated with Claude Code