From 8ca22813c9506252e208242fc0ebb7d71ee7f8a6 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 24 Sep 2014 23:32:46 -0700 Subject: [PATCH] Clean up Show impl a bit --- src/types/range.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/types/range.rs b/src/types/range.rs index 4955fde6..44af7aca 100644 --- a/src/types/range.rs +++ b/src/types/range.rs @@ -202,14 +202,14 @@ impl Clone for RangeBound where S: BoundSided, T: Clone { impl fmt::Show for RangeBound where S: BoundSided, T: fmt::Show { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - let chars = match self.type_ { - Inclusive => ['[', ']'], - Exclusive => ['(', ')'], + let (lower, upper) = match self.type_ { + Inclusive => ('[', ']'), + Exclusive => ('(', ')'), }; match BoundSided::side(None::) { - Lower => write!(fmt, "{}{}", chars[0], self.value), - Upper => write!(fmt, "{}{}", self.value, chars[1]), + Lower => write!(fmt, "{}{}", lower, self.value), + Upper => write!(fmt, "{}{}", self.value, upper), } } }