Skip to content

Commit 3baec46

Browse files
committed
fix: add correct constraints for pre-release versions
Signed-off-by: Andrey <andrekabatareika@gmail.com>
1 parent 366b508 commit 3baec46

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

compiler-cli/src/add.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,7 @@ pub fn command(paths: &ProjectPaths, packages_to_add: Vec<String>, dev: bool) ->
5858

5959
// Produce a version requirement locked to the major version.
6060
// i.e. if 1.2.3 is selected we want >= 1.2.3 and < 2.0.0
61-
let range = format!(
62-
">= {}.{}.{} and < {}.0.0",
63-
version.major,
64-
version.minor,
65-
version.patch,
66-
version.major + 1
67-
);
61+
let range = format!(">= {} and < {}.0.0", version, version.major + 1);
6862

6963
// False positive. This package doesn't use the indexing API correctly.
7064
#[allow(clippy::indexing_slicing)]

0 commit comments

Comments
 (0)