From db0693ac8d06202a289f451c223eb6f514819ffe Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 10 May 2013 18:19:58 -0700 Subject: libsyntax: Tighten up expressions in patterns to only allow identifiers or literals (possibly with a minus). This had very minimal fallout. --- src/libcore/num/strconv.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libcore/num') diff --git a/src/libcore/num/strconv.rs b/src/libcore/num/strconv.rs index c16a29f8295..052246a7744 100644 --- a/src/libcore/num/strconv.rs +++ b/src/libcore/num/strconv.rs @@ -486,11 +486,11 @@ pub fn from_str_bytes_common+ } } - let (start, accum_positive) = match buf[0] { - '-' as u8 if !negative => return None, - '-' as u8 => (1u, false), - '+' as u8 => (1u, true), - _ => (0u, true) + let (start, accum_positive) = match buf[0] as char { + '-' if !negative => return None, + '-' => (1u, false), + '+' => (1u, true), + _ => (0u, true) }; // Initialize accumulator with signed zero for floating point parsing to -- cgit 1.4.1-3-g733a5