aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model/src/build_data.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-18 13:18:25 +0100
committerGitHub <[email protected]>2021-06-18 13:18:25 +0100
commit7eb843b218b5e10b39a5171f5b9689ec6c2d71c3 (patch)
tree64e3deddd104187ff8aa9b5dd9c64819a5378f1d /crates/project_model/src/build_data.rs
parent86c3c42d8ed060b66df95f33c20c1f5778c38ee0 (diff)
parent6b1f0057f2dbe48f1c59c8938957daf158e30823 (diff)
Merge #9325
9325: Minor: clippy perf fixes r=matklad a=lnicola Co-authored-by: LaurenČ›iu Nicola <[email protected]>
Diffstat (limited to 'crates/project_model/src/build_data.rs')
-rw-r--r--crates/project_model/src/build_data.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/project_model/src/build_data.rs b/crates/project_model/src/build_data.rs
index 53cb4bae7..45bbb08dc 100644
--- a/crates/project_model/src/build_data.rs
+++ b/crates/project_model/src/build_data.rs
@@ -187,7 +187,7 @@ impl WorkspaceBuildData {
187 let mut deserializer = serde_json::Deserializer::from_str(line); 187 let mut deserializer = serde_json::Deserializer::from_str(line);
188 deserializer.disable_recursion_limit(); 188 deserializer.disable_recursion_limit();
189 let message = Message::deserialize(&mut deserializer) 189 let message = Message::deserialize(&mut deserializer)
190 .unwrap_or(Message::TextLine(line.to_string())); 190 .unwrap_or_else(|_| Message::TextLine(line.to_string()));
191 191
192 match message { 192 match message {
193 Message::BuildScriptExecuted(BuildScript { 193 Message::BuildScriptExecuted(BuildScript {
@@ -229,7 +229,7 @@ impl WorkspaceBuildData {
229 Message::CompilerArtifact(message) => { 229 Message::CompilerArtifact(message) => {
230 progress(format!("metadata {}", message.target.name)); 230 progress(format!("metadata {}", message.target.name));
231 231
232 if message.target.kind.contains(&"proc-macro".to_string()) { 232 if message.target.kind.iter().any(|k| k == "proc-macro") {
233 let package_id = message.package_id; 233 let package_id = message.package_id;
234 // Skip rmeta file 234 // Skip rmeta file
235 if let Some(filename) = 235 if let Some(filename) =