We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fbbaac commit 8ca2281Copy full SHA for 8ca2281
src/types/range.rs
@@ -202,14 +202,14 @@ impl<S, T> Clone for RangeBound<S, T> where S: BoundSided, T: Clone {
202
203
impl<S, T> fmt::Show for RangeBound<S, T> where S: BoundSided, T: fmt::Show {
204
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
205
- let chars = match self.type_ {
206
- Inclusive => ['[', ']'],
207
- Exclusive => ['(', ')'],
+ let (lower, upper) = match self.type_ {
+ Inclusive => ('[', ']'),
+ Exclusive => ('(', ')'),
208
};
209
210
match BoundSided::side(None::<S>) {
211
- Lower => write!(fmt, "{}{}", chars[0], self.value),
212
- Upper => write!(fmt, "{}{}", self.value, chars[1]),
+ Lower => write!(fmt, "{}{}", lower, self.value),
+ Upper => write!(fmt, "{}{}", self.value, upper),
213
}
214
215
0 commit comments