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.
This commit is contained in:
Ed Page 2024-01-29 20:45:35 -06:00
parent e7f1009bc4
commit a1db0b1383
2 changed files with 2 additions and 1 deletions

View File

@ -184,6 +184,7 @@ pub fn update_lockfile(ws: &Workspace<'_>, opts: &UpdateOptions<'_>) -> CargoRes
possibilities
.iter()
.map(|s| s.as_summary())
.filter(|s| s.version().pre.is_empty())
.map(|s| s.version().clone())
.max()
.filter(|v| added.version() < v)

View File

@ -1500,7 +1500,7 @@ fn report_behind() {
.with_stderr(
"\
[UPDATING] `dummy-registry` index
[UPDATING] breaking v0.1.0 -> v0.1.1 (latest: v0.2.1-alpha.0)
[UPDATING] breaking v0.1.0 -> v0.1.1 (latest: v0.2.0)
",
)
.run();