Skip to content

Commit 4b2c6af

Browse files
committed
Add some doc comments
Context: #341
1 parent 373c3b1 commit 4b2c6af

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crate2nix/src/metadata.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ use serde::Deserialize;
1313
use serde::Serialize;
1414

1515
/// The merged metadata of potentially multiple sources.
16+
///
17+
/// Metadata: Package Metadata from Cargo.lock files.
18+
///
19+
/// Why "merged" metadata: crate2nix can be used to generate
20+
/// builds for multiple projects without combining them into a
21+
/// workspace.
1622
#[derive(Debug)]
1723
pub struct MergedMetadata {
1824
workspace_members: Vec<PackageId>,
@@ -136,6 +142,9 @@ impl IndexedMetadata {
136142
}
137143
}
138144

145+
/// "Shortens" package IDs to potentially remove local paths from
146+
/// the IDs. The local paths can make the build file generation
147+
/// depend on the local systems path.
139148
#[derive(Debug, Deserialize, Serialize, Clone)]
140149
pub struct PackageIdShortener {
141150
substitution: HashMap<PackageId, PackageId>,

0 commit comments

Comments
 (0)