From 506fbaf4e7748964a203542373e1bfd6a572ab64 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Mon, 10 Jul 2017 08:09:49 -0400 Subject: [PATCH] swap 'Some(u)' out for '_' to suppress unused variable warnings --- complex/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/complex/src/lib.rs b/complex/src/lib.rs index d42a886..5743468 100644 --- a/complex/src/lib.rs +++ b/complex/src/lib.rs @@ -773,7 +773,7 @@ impl FromStr for Complex where // if `a` is imaginary, let `b` be real (and vice versa) match a.rfind('i') { None => "0i".to_string(), - Some(u) => "0".to_string() + _ => "0".to_string() } } Some(s) => { @@ -790,7 +790,7 @@ impl FromStr for Complex where try!(T::from_str(&a) .map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError })) }, - Some(u) => { + _ => { try!(T::from_str(&b) .map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError })) } @@ -802,7 +802,7 @@ impl FromStr for Complex where try!(T::from_str(&b) .map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError })) }, - Some(u) => { + _ => { a.pop(); try!(T::from_str(&a) .map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError }))