Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-test/build.rs')
| -rw-r--r-- | crates/proc-macro-test/build.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crates/proc-macro-test/build.rs b/crates/proc-macro-test/build.rs index a80c962617..dd6203e2ee 100644 --- a/crates/proc-macro-test/build.rs +++ b/crates/proc-macro-test/build.rs @@ -85,16 +85,13 @@ fn main() { let mut artifact_path = None; for message in Message::parse_stream(output.stdout.as_slice()) { - match message.unwrap() { - Message::CompilerArtifact(artifact) => { - if artifact.target.kind.contains(&"proc-macro".to_string()) { - let repr = format!("{} {}", name, version); - if artifact.package_id.repr.starts_with(&repr) { - artifact_path = Some(PathBuf::from(&artifact.filenames[0])); - } + if let Message::CompilerArtifact(artifact) = message.unwrap() { + if artifact.target.kind.contains(&"proc-macro".to_string()) { + let repr = format!("{} {}", name, version); + if artifact.package_id.repr.starts_with(&repr) { + artifact_path = Some(PathBuf::from(&artifact.filenames[0])); } } - _ => (), // Unknown message } } |