From bd22a89a32edef116d2026c2830c827ec6c7c08d Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 19 Jul 2017 12:49:03 -0700 Subject: [PATCH] complex: Simplify the from_str signature --- complex/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/complex/src/lib.rs b/complex/src/lib.rs index a4e2887..bb30c8c 100644 --- a/complex/src/lib.rs +++ b/complex/src/lib.rs @@ -748,7 +748,7 @@ impl FromStr for Complex where type Err = ParseComplexError; /// Parses `a +/- bi`; `ai +/- b`; `a`; or `bi` where `a` and `b` are of type `T` - fn from_str(s: &str) -> Result, ParseComplexError> + fn from_str(s: &str) -> Result { let imag = match s.rfind('j') { None => 'i',