collapsible_if

This commit is contained in:
Johann Hemmann 2024-01-22 00:08:55 +01:00
parent 11b401d0b4
commit 75a42f1a09

View file

@ -109,14 +109,14 @@ fn main() {
let mut artifact_path = None; let mut artifact_path = None;
for message in Message::parse_stream(output.stdout.as_slice()) { for message in Message::parse_stream(output.stdout.as_slice()) {
if let Message::CompilerArtifact(artifact) = message.unwrap() { if let Message::CompilerArtifact(artifact) = message.unwrap() {
if artifact.target.kind.contains(&"proc-macro".to_string()) { if artifact.target.kind.contains(&"proc-macro".to_string())
if artifact.package_id.repr.starts_with(&repr) || artifact.package_id.repr == pkgid && (artifact.package_id.repr.starts_with(&repr)
|| artifact.package_id.repr == pkgid)
{ {
artifact_path = Some(PathBuf::from(&artifact.filenames[0])); artifact_path = Some(PathBuf::from(&artifact.filenames[0]));
} }
} }
} }
}
// This file is under `target_dir` and is already under `OUT_DIR`. // This file is under `target_dir` and is already under `OUT_DIR`.
let artifact_path = artifact_path.expect("no dylib for proc-macro-test-impl found"); let artifact_path = artifact_path.expect("no dylib for proc-macro-test-impl found");