Skip to content

Commit f016160

Browse files
committed
refactor(publish): Remove manual package list
1 parent 355bc56 commit f016160

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/cargo/ops/registry/publish.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,7 @@ pub fn publish(ws: &Workspace<'_>, opts: &PublishOpts<'_>) -> CargoResult<()> {
286286
timeout,
287287
)?;
288288
if !confirmed.is_empty() {
289-
let short_pkg_description = confirmed
290-
.iter()
291-
.map(|pkg| format!("{} v{}", pkg.name(), pkg.version()))
292-
.sorted()
293-
.join(", ");
289+
let short_pkg_description = package_list(confirmed.iter().copied(), "and");
294290
opts.gctx.shell().status(
295291
"Published",
296292
format!("{short_pkg_description} at {source_description}"),

tests/testsuite/publish.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3891,7 +3891,7 @@ fn workspace_parallel() {
38913891
[UPLOADED] a v0.0.1 to registry `crates-io`
38923892
[NOTE] waiting for a v0.0.1 or b v0.0.1 to be available at registry `crates-io`.
38933893
You may press ctrl-c to skip waiting; the crates should be available shortly.
3894-
[PUBLISHED] a v0.0.1, b v0.0.1 at registry `crates-io`
3894+
[PUBLISHED] a v0.0.1 and b v0.0.1 at registry `crates-io`
38953895
[UPLOADING] c v0.0.1 ([ROOT]/foo/c)
38963896
[UPLOADED] c v0.0.1 to registry `crates-io`
38973897
[NOTE] waiting for c v0.0.1 to be available at registry `crates-io`.

0 commit comments

Comments
 (0)