Skip to content

fix: remove stale attribute, add Config docs, fix doc links, remove dead code - #864

Merged
abayomicornelius merged 3 commits into
SO4-Markets:mainfrom
PrimeFactor-Dev:fix/doc-and-cleanup-issues
Aug 31, 2026
Merged

fix: remove stale attribute, add Config docs, fix doc links, remove dead code#864
abayomicornelius merged 3 commits into
SO4-Markets:mainfrom
PrimeFactor-Dev:fix/doc-and-cleanup-issues

Conversation

@PrimeFactor-Dev

Copy link
Copy Markdown
Contributor

Closes #686, Closes #679, Closes #688, Closes #684

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Documentation update

Summary

Four low-risk documentation and dead-code cleanup fixes across the oracle and shared-config crates:

  1. Stale #[allow(unused_mut)] attribute on a non-mut listener binding in main.rs #686: Remove stale #[allow(unused_mut)] attribute from main.rs — the listener is bound with plain let, so the attribute is a no-op leftover from an earlier version.
  2. Config struct: 21 of 24 public fields have no doc comments #679: Add one-line /// doc comments to all 21 undocumented public fields in the Config struct, including env var names and defaults.
  3. EnvErrors doc comment links to Config::from_lookup, which is a private function #688: Fix EnvErrors doc comment that linked to private Config::from_lookup (unresolvable in external docs). Removed the link to from_lookup.
  4. shared_config exposes MissingEnvVar, load_from_env_var, load_from_file, and build_lookup — none are called outside their own unit tests #684: Remove unused public items from shared_config: ConfigError::MissingEnvVar (never constructed), load_from_env_var, load_from_file, and build_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:

cargo fmt --all -- --check                    ✓
cargo clippy --all-targets --all-features --locked -- -D warnings  ✓
RUSTFLAGS=-Dwarnings cargo test --all --locked  ✓ (335 tests passed)

Tradeoffs

  • The MissingEnvVar variant removal is a minor API change to shared_config, but since no code constructs or matches on it outside tests, this is safe.
  • Doc comments on Config fields use env var names derived from the from_lookup implementation — these are the authoritative source.

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
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment