Skip to content

Commit 693f21e

Browse files
committed
feat(index): Read 'rust_version'
1 parent 07e3bb8 commit 693f21e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/cargo/sources/registry/index.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ impl IndexSummary {
814814
features2,
815815
yanked,
816816
links,
817+
rust_version: _,
817818
v,
818819
} = serde_json::from_slice(line)?;
819820
let v = v.unwrap_or(1);

src/cargo/sources/registry/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,14 @@ pub struct RegistryPackage<'a> {
287287
/// Added early 2018 (see <https://github.com/rust-lang/cargo/pull/4978>),
288288
/// can be `None` if published before then.
289289
links: Option<InternedString>,
290+
/// Required version of rust
291+
///
292+
/// Corresponds to `package.rust-version`.
293+
///
294+
/// Added in 2023 (see <https://github.com/rust-lang/crates.io/pull/6267>),
295+
/// can be `None` if published before then or if not set in the manifest.
296+
#[allow(dead_code)]
297+
rust_version: Option<InternedString>,
290298
/// The schema version for this entry.
291299
///
292300
/// If this is None, it defaults to version 1. Entries with unknown

0 commit comments

Comments
 (0)