Repository navigation
fix(port_strategy): fall back to full range when both range and ports are missing - #971
Open
delaysystem wants to merge 1 commit into
Open
delaysystem wants to merge 1 commit into
delaysystem wants to merge 1 commit into
Conversation
… are missing PortStrategy::pick(&None, None, _) unwrapped the range and panicked. The CLI always defaults the range, but the type is public API and library callers can pass neither; scan 1-65535 then, like the CLI default, instead of panicking. Explicit port lists (including empty ones) keep their existing precedence.
|
This branch has not been deployed
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.



PortStrategy::pick(&None, None, _)unwrappedrangeand panicked. The CLI always defaults the range, but the type is public API (lib.rs documents library use) and the signature invites the call. Now it scans 1-65535 like the CLI default.Explicit port lists (including empty) keep precedence over the range, locked by tests. All callers audited (main.rs, lib.rs example, tests, benches), none depends on the panic.
Tests: 4 new unit tests; full gates green (cargo test, both clippy gates deny-warnings, fmt, doc). Possible rebase touch with #961's strategy tests (complementary, not overlapping).