Skip to content

Commit a1db0b1

Browse files
committed
fix(update): Don't bother listing pre-release
There might be casses where we want to show pre-release as this grows but, for now, there isn't too often a case where an update is held back, you are on a pre-release, your pre-release is updating, and you want a pre-release.
1 parent e7f1009 commit a1db0b1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cargo/ops/cargo_generate_lockfile.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ pub fn update_lockfile(ws: &Workspace<'_>, opts: &UpdateOptions<'_>) -> CargoRes
184184
possibilities
185185
.iter()
186186
.map(|s| s.as_summary())
187+
.filter(|s| s.version().pre.is_empty())
187188
.map(|s| s.version().clone())
188189
.max()
189190
.filter(|v| added.version() < v)

tests/testsuite/update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ fn report_behind() {
15001500
.with_stderr(
15011501
"\
15021502
[UPDATING] `dummy-registry` index
1503-
[UPDATING] breaking v0.1.0 -> v0.1.1 (latest: v0.2.1-alpha.0)
1503+
[UPDATING] breaking v0.1.0 -> v0.1.1 (latest: v0.2.0)
15041504
",
15051505
)
15061506
.run();

0 commit comments

Comments
 (0)