Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
Range::is_empty()
and Range::bounds()
Co-authored-by: Charlie Marsh <[email protected]> We use `Range::is_empty()` for special casing the empty version range in error messages: https://github.com/astral-sh/uv/blob/8d721830db8ad75b8b7ef38edc0e346696c52e3d/crates/uv-resolver/src/pubgrub/report.rs#L553 https://github.com/astral-sh/uv/blob/8d721830db8ad75b8b7ef38edc0e346696c52e3d/crates/uv-resolver/src/pubgrub/report.rs#L565 We use `Range::bounds()` to check for prerelease bounds and hint the user at our prerelease rules: https://github.com/astral-sh/uv/blob/8d721830db8ad75b8b7ef38edc0e346696c52e3d/crates/uv-resolver/src/pubgrub/report.rs#L360 Upstream port of astral-sh#16
- Loading branch information