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,