diff --git a/xtask/src/nightly_release_notes.rs b/xtask/src/nightly_release_notes.rs index f41d62d51..6fdabaa05 100644 --- a/xtask/src/nightly_release_notes.rs +++ b/xtask/src/nightly_release_notes.rs @@ -28,11 +28,14 @@ pub fn main(_: Args) -> Result<()> { .unwrap() .iter() .find(|node| { - node.get("id") + let repr = node.get("id") .unwrap() .as_str() - .unwrap() - .starts_with("scarb ") + .unwrap(); + // The first condition for Rust >= 1.77 + // (After the PackageId spec stabilization) + // The second condition for Rust < 1.77 + repr.contains("scarb#") || repr.starts_with("scarb ") }) .unwrap() .get("deps")