From 3e48c540f6c87d86f09002776475c99ecce1f9f5 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 21 May 2020 18:37:08 -0700 Subject: [PATCH] Resolve clippy map_unwrap_or pedantic lint in test suite --- tests/test_expr.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_expr.rs b/tests/test_expr.rs index e86d33a..6519635 100644 --- a/tests/test_expr.rs +++ b/tests/test_expr.rs @@ -39,8 +39,7 @@ pub enum RustupError { "toolchain '{name}' does not contain component {component}{}", .suggestion .as_ref() - .map(|s| format!("; did you mean '{}'?", s)) - .unwrap_or_else(String::new), + .map_or_else(String::new, |s| format!("; did you mean '{}'?", s)), )] UnknownComponent { name: String,