fix: remove stale attribute, add Config docs, fix doc links, remove dead code - #864
Merged
abayomicornelius merged 3 commits intoAug 31, 2026
Conversation
The #[allow(unused_mut)] attribute on line 37 of main.rs is a no-op left over from an earlier version where the listener was declared with 'let mut'. Removing it eliminates dead cruft from the crate's primary entry point. Closes SO4-Markets#686
- Add one-line doc comments to all 21 undocumented public fields in the Config struct, including env var names and defaults (SO4-Markets#679). - Fix EnvErrors doc comment that linked to private Config::from_lookup, which is not resolvable in external crate docs (SO4-Markets#688). Closes SO4-Markets#679, Closes SO4-Markets#688
Remove ConfigError::MissingEnvVar (never constructed), load_from_env_var, load_from_file, and build_lookup — none have call sites outside their own unit tests. These were built for a planned API-server consumer that ended up using a different mechanism, leaving unused surface area. Closes SO4-Markets#684
|
@PrimeFactor-Dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #686, Closes #679, Closes #688, Closes #684
Type of Change
Summary
Four low-risk documentation and dead-code cleanup fixes across the oracle and shared-config crates:
#[allow(unused_mut)]attribute frommain.rs— the listener is bound with plainlet, so the attribute is a no-op leftover from an earlier version.///doc comments to all 21 undocumented public fields in theConfigstruct, including env var names and defaults.EnvErrorsdoc comment that linked to privateConfig::from_lookup(unresolvable in external docs). Removed the link tofrom_lookup.shared_config:ConfigError::MissingEnvVar(never constructed),load_from_env_var,load_from_file, andbuild_lookup— none have call sites outside their own unit tests.Motivation / Context
These are four tracked issues addressing dead code, missing documentation, and broken doc links. Each fix is minimal and scoped to the exact problem described in the issue.
Closes #686, Closes #679, Closes #688, Closes #684
Testing
All verification gate commands passed:
Tradeoffs
MissingEnvVarvariant removal is a minor API change toshared_config, but since no code constructs or matches on it outside tests, this is safe.Configfields use env var names derived from thefrom_lookupimplementation — these are the authoritative source.