Skip to content

Commit 504c4b2

Browse files
committed
Add optional flag to manifest for dependencies
Signed-off-by: hi-rustin <[email protected]>
1 parent 12d7818 commit 504c4b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/cargo-test-support/src/registry.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,9 @@ impl Package {
15641564
"#,
15651565
target, kind, dep.name, dep.vers
15661566
));
1567+
if dep.optional {
1568+
manifest.push_str("optional = true\n");
1569+
}
15671570
if let Some(artifact) = &dep.artifact {
15681571
manifest.push_str(&format!("artifact = \"{}\"\n", artifact));
15691572
}

0 commit comments

Comments
 (0)