swap 'Some(u)' out for '_' to suppress unused variable warnings

This commit is contained in:
Alan Liddell 2017-07-10 08:09:49 -04:00
parent 3c490cdee4
commit 506fbaf4e7
1 changed files with 3 additions and 3 deletions

View File

@ -773,7 +773,7 @@ impl<T> FromStr for Complex<T> where
// if `a` is imaginary, let `b` be real (and vice versa) // if `a` is imaginary, let `b` be real (and vice versa)
match a.rfind('i') { match a.rfind('i') {
None => "0i".to_string(), None => "0i".to_string(),
Some(u) => "0".to_string() _ => "0".to_string()
} }
} }
Some(s) => { Some(s) => {
@ -790,7 +790,7 @@ impl<T> FromStr for Complex<T> where
try!(T::from_str(&a) try!(T::from_str(&a)
.map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError })) .map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError }))
}, },
Some(u) => { _ => {
try!(T::from_str(&b) try!(T::from_str(&b)
.map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError })) .map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError }))
} }
@ -802,7 +802,7 @@ impl<T> FromStr for Complex<T> where
try!(T::from_str(&b) try!(T::from_str(&b)
.map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError })) .map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError }))
}, },
Some(u) => { _ => {
a.pop(); a.pop();
try!(T::from_str(&a) try!(T::from_str(&a)
.map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError })) .map_err(|_| ParseComplexError { kind: ComplexErrorKind::ParseError }))