Skip to content

Commit 20904ab

Browse files
committed
Style cleanup
1 parent 1e22911 commit 20904ab

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

types/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -617,35 +617,35 @@ macro_rules! to_range_impl(
617617
if self.is_empty() {
618618
tag |= RANGE_EMPTY;
619619
} else {
620-
match self.lower() {
621-
&None => tag |= RANGE_LOWER_UNBOUNDED,
622-
&Some(RangeBound { type_: Inclusive, .. }) =>
620+
match *self.lower() {
621+
None => tag |= RANGE_LOWER_UNBOUNDED,
622+
Some(RangeBound { type_: Inclusive, .. }) =>
623623
tag |= RANGE_LOWER_INCLUSIVE,
624624
_ => {}
625625
}
626-
match self.upper() {
627-
&None => tag |= RANGE_UPPER_UNBOUNDED,
628-
&Some(RangeBound { type_: Inclusive, .. }) =>
626+
match *self.upper() {
627+
None => tag |= RANGE_UPPER_UNBOUNDED,
628+
Some(RangeBound { type_: Inclusive, .. }) =>
629629
tag |= RANGE_UPPER_INCLUSIVE,
630630
_ => {}
631631
}
632632
}
633633
634634
buf.write_i8(tag);
635635
636-
match self.lower() {
637-
&Some(ref bound) => {
636+
match *self.lower() {
637+
Some(ref bound) => {
638638
buf.write_be_i32(bound.value.raw_size() as i32);
639639
bound.value.raw_to_sql(&mut buf);
640640
}
641-
&None => {}
641+
None => {}
642642
}
643-
match self.upper() {
644-
&Some(ref bound) => {
643+
match *self.upper() {
644+
Some(ref bound) => {
645645
buf.write_be_i32(bound.value.raw_size() as i32);
646646
bound.value.raw_to_sql(&mut buf);
647647
}
648-
&None => {}
648+
None => {}
649649
}
650650
651651
(Binary, Some(buf.inner()))

types/range.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ impl<T: Ord+Normalizable> Range<T> {
156156
/// If a bound is `None`, the range is unbounded in that direction.
157157
pub fn new(lower: Option<RangeBound<LowerBound, T>>,
158158
upper: Option<RangeBound<UpperBound, T>>) -> Range<T> {
159-
let lower = lower.map(|bound| { Normalizable::normalize(bound) });
160-
let upper = upper.map(|bound| { Normalizable::normalize(bound) });
159+
let lower = lower.map(|bound| Normalizable::normalize(bound));
160+
let upper = upper.map(|bound| Normalizable::normalize(bound));
161161

162162
match (&lower, &upper) {
163163
(&Some(ref lower), &Some(ref upper)) => {
@@ -209,8 +209,8 @@ impl<T: Ord+Normalizable> Range<T> {
209209
match *self {
210210
Empty => false,
211211
Normal(ref lower, ref upper) => {
212-
lower.as_ref().map_default(true, |b| { b.in_bounds(value) }) &&
213-
upper.as_ref().map_default(true, |b| { b.in_bounds(value) })
212+
lower.as_ref().map_default(true, |b| b.in_bounds(value)) &&
213+
upper.as_ref().map_default(true, |b| b.in_bounds(value))
214214
}
215215
}
216216
}

0 commit comments

Comments
 (0)