From 8b2b343b23c50e136e14c303f2579ae2a2fda5f2 Mon Sep 17 00:00:00 2001 From: infrandomness Date: Sat, 9 Apr 2022 18:35:18 +0200 Subject: [PATCH] Delete unused variable `y` in test This fixes the errors occuring while running the ui tests --- tests/ui/needless_option_take.rs | 2 +- tests/ui/option_take_on_temporary.fixed | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ui/needless_option_take.rs b/tests/ui/needless_option_take.rs index eb57ffeab45..27cc9a2e61e 100644 --- a/tests/ui/needless_option_take.rs +++ b/tests/ui/needless_option_take.rs @@ -3,5 +3,5 @@ fn main() { println!("Testing option_take_on_temporary"); let x = Some(3); - let y = x.as_ref().take(); + x.as_ref().take(); } diff --git a/tests/ui/option_take_on_temporary.fixed b/tests/ui/option_take_on_temporary.fixed index 9b4ca5a4ad1..7e293076682 100644 --- a/tests/ui/option_take_on_temporary.fixed +++ b/tests/ui/option_take_on_temporary.fixed @@ -3,5 +3,5 @@ fn main() { println!("Testing option_take_on_temporary"); let x = Some(3); - let y = x.as_ref(); + x.as_ref(); }