Skip to content

Commit 294fe8f

Browse files
committed
Auto merge of #12782 - Turbo87:new-crate-docs, r=epage
crates-io: Add doc comment for `NewCrate` struct This PR adds a small doc comment to the `NewCrate` struct in the `crates-io` package, linking to https://doc.rust-lang.org/cargo/reference/registry-web-api.html#publish to give additional context. I saw other links to https://doc.rust-lang.org in some of the doc comments, so I'm hoping this is correct vs. linking directly to the file with a relative path?
2 parents fc790e7 + 9e5dac1 commit 294fe8f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/crates-io/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "crates-io"
3-
version = "0.39.0"
3+
version = "0.39.1"
44
rust-version.workspace = true
55
edition.workspace = true
66
license.workspace = true

crates/crates-io/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ pub struct Crate {
3838
pub max_version: String,
3939
}
4040

41+
/// This struct is serialized as JSON and sent as metadata ahead of the crate
42+
/// tarball when publishing crates to a crate registry like crates.io.
43+
///
44+
/// see <https://doc.rust-lang.org/cargo/reference/registry-web-api.html#publish>
4145
#[derive(Serialize, Deserialize)]
4246
pub struct NewCrate {
4347
pub name: String,

0 commit comments

Comments
 (0)