Skip to content

refactor: explicit pub visibility - #68

Merged
ryan-berger merged 1 commit into
tombh/adjacent-polar-viewshed-builderfrom
tombh/explicit-pub-visibility
Jul 3, 2026
Merged

refactor: explicit pub visibility#68
ryan-berger merged 1 commit into
tombh/adjacent-polar-viewshed-builderfrom
tombh/explicit-pub-visibility

Conversation

@tombh

@tombh tombh commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Adds the following lints:

unreachable_pub = "warn"
redundant_pub_crate = "allow"

This enforces the practice of explicitly defining visibility. Therefore, if a symbol isn't truly public to the outside world then it should be qualified with pub(crate), pub(super), etc.

This is slightly more verbose but helps reasoning about API surfaces and also safeguards against unexpected symbols becoming public when parent visibility is changed.

Also splits the viewshed joiner code into its own submodule, again to removed the need for a pub(crate).

@tombh
tombh requested a review from ryan-berger July 3, 2026 08:10
Adds the following lints:

  unreachable_pub = "warn"
  redundant_pub_crate = "allow"

This enforces the practice of explicitly defining visibility. Therefore,
if a symbol isn't truly public to the outside world then it should be
qualified with `pub(crate)`, `pub(super)`, etc.

This is slightly more verbose but helps reasoning about API surfaces and
also safeguards against unexpected symbols becoming public when parent
visibility is changed.
@tombh
tombh force-pushed the tombh/explicit-pub-visibility branch from aa5f269 to eeaae03 Compare July 3, 2026 08:12
@ryan-berger
ryan-berger merged commit 4f2574f into tombh/adjacent-polar-viewshed-builder Jul 3, 2026
4 checks passed
@ryan-berger
ryan-berger deleted the tombh/explicit-pub-visibility branch July 3, 2026 20:25
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.

2 participants