about summary refs log tree commit diff
path: root/src/libcollections/range.rs
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-11-24 11:23:48 +1300
committerNick Cameron <ncameron@mozilla.com>2015-11-24 11:53:47 +1300
commit0dfd875b6efa68ed67988a2f9856fc3bbdc91ce2 (patch)
tree4cbbfc1e2246c63f75e0d1f0e48d99153504b7b2 /src/libcollections/range.rs
parent1f1a1e6595cb9472927cd91d523982047832aa7a (diff)
downloadrust-0dfd875b6efa68ed67988a2f9856fc3bbdc91ce2.tar.gz
rust-0dfd875b6efa68ed67988a2f9856fc3bbdc91ce2.zip
rustfmt libcollections
Diffstat (limited to 'src/libcollections/range.rs')
-rw-r--r--src/libcollections/range.rs24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/libcollections/range.rs b/src/libcollections/range.rs
index e7414bcf323..c70aa67366b 100644
--- a/src/libcollections/range.rs
+++ b/src/libcollections/range.rs
@@ -22,26 +22,38 @@ pub trait RangeArgument<T> {
     /// Start index (inclusive)
     ///
     /// Return start value if present, else `None`.
-    fn start(&self) -> Option<&T> { None }
+    fn start(&self) -> Option<&T> {
+        None
+    }
 
     /// End index (exclusive)
     ///
     /// Return end value if present, else `None`.
-    fn end(&self) -> Option<&T> { None }
+    fn end(&self) -> Option<&T> {
+        None
+    }
 }
 
 
 impl<T> RangeArgument<T> for RangeFull {}
 
 impl<T> RangeArgument<T> for RangeFrom<T> {
-    fn start(&self) -> Option<&T> { Some(&self.start) }
+    fn start(&self) -> Option<&T> {
+        Some(&self.start)
+    }
 }
 
 impl<T> RangeArgument<T> for RangeTo<T> {
-    fn end(&self) -> Option<&T> { Some(&self.end) }
+    fn end(&self) -> Option<&T> {
+        Some(&self.end)
+    }
 }
 
 impl<T> RangeArgument<T> for Range<T> {
-    fn start(&self) -> Option<&T> { Some(&self.start) }
-    fn end(&self) -> Option<&T> { Some(&self.end) }
+    fn start(&self) -> Option<&T> {
+        Some(&self.start)
+    }
+    fn end(&self) -> Option<&T> {
+        Some(&self.end)
+    }
 }