Skip to content

Comments

chore: add #[must_use] to constructors and accessor methods#61

Merged
refcell merged 1 commit intomainfrom
reviewer-beta/add-must-use-remaining
Feb 1, 2026
Merged

chore: add #[must_use] to constructors and accessor methods#61
refcell merged 1 commit intomainfrom
reviewer-beta/add-must-use-remaining

Conversation

@refcell
Copy link
Owner

@refcell refcell commented Feb 1, 2026

Summary

  • Adds #[must_use] annotations to all public constructors and accessor methods across the codebase
  • Improves code quality by catching accidental non-usage of important return values
  • Ensures consistency with Rust idioms for builder and factory patterns

Changes

  • IndexedStateProvider::new in crates/node/rpc/src/indexed_provider.rs
  • RevmExecutor::new and RevmExecutor::with_config in crates/node/executor/src/revm.rs
  • StateDbAdapter::new and StateDbAdapter::state in crates/node/executor/src/adapter.rs
  • CommonwareRootProvider::new and all accessor methods in crates/storage/backend/src/backend.rs
  • DkgCeremony::new and DkgCeremony::new_with_force_restart in crates/node/dkg/src/ceremony.rs
  • Tx::new in crates/node/domain/src/tx.rs
  • BootstrapConfig::new in crates/node/domain/src/bootstrap.rs
  • BlockContext::new in crates/node/executor/src/context.rs
  • KoraApiImpl::new in crates/node/rpc/src/kora.rs
  • StorageKey::new in crates/storage/qmdb/src/encoding.rs

Verification

  • cargo clippy --all-targets --all-features -- -D warnings passes
  • cargo nextest run --workspace --all-features passes (498 tests)
  • ✅ No breaking changes to public APIs

@refcell refcell merged commit a80c473 into main Feb 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant