From e3ce88f6f25901b1d33fbc5f931a9d8f90b9e2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 18 Jun 2021 14:40:51 +0300 Subject: Minor clippy perf fixes --- crates/project_model/src/build_data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/project_model') diff --git a/crates/project_model/src/build_data.rs b/crates/project_model/src/build_data.rs index 53cb4bae7..a76f25a8c 100644 --- a/crates/project_model/src/build_data.rs +++ b/crates/project_model/src/build_data.rs @@ -187,7 +187,7 @@ impl WorkspaceBuildData { let mut deserializer = serde_json::Deserializer::from_str(line); deserializer.disable_recursion_limit(); let message = Message::deserialize(&mut deserializer) - .unwrap_or(Message::TextLine(line.to_string())); + .unwrap_or_else(|_| Message::TextLine(line.to_string())); match message { Message::BuildScriptExecuted(BuildScript { -- cgit v1.2.3