]> git.lizzy.rs Git - rust.git/commitdiff
std: fix the casing of option::{Some,None} in the docs
authorErick Tryzelaar <erick.tryzelaar@gmail.com>
Wed, 24 Jul 2013 04:29:02 +0000 (21:29 -0700)
committerErick Tryzelaar <erick.tryzelaar@gmail.com>
Sun, 28 Jul 2013 06:41:10 +0000 (23:41 -0700)
src/libstd/option.rs

index eb3f227562a82c9eca7b5bb88885bdb6e76d3b79..ff35af4cff020c4e61013eb37cd54612a8b6d488 100644 (file)
@@ -271,7 +271,7 @@ pub fn mutate_default(&mut self, def: T, f: &fn(T) -> T) {
     pub fn get_ref<'a>(&'a self) -> &'a T {
         match *self {
           Some(ref x) => x,
-          None => fail!("option::get_ref None")
+          None => fail!("option::get_ref `None`"),
         }
     }
 
@@ -293,7 +293,7 @@ pub fn get_ref<'a>(&'a self) -> &'a T {
     pub fn get_mut_ref<'a>(&'a mut self) -> &'a mut T {
         match *self {
           Some(ref mut x) => x,
-          None => fail!("option::get_mut_ref None")
+          None => fail!("option::get_mut_ref `None`"),
         }
     }
 
@@ -317,7 +317,7 @@ pub fn unwrap(self) -> T {
          */
         match self {
           Some(x) => x,
-          None => fail!("option::unwrap None")
+          None => fail!("option::unwrap `None`"),
         }
     }
 
@@ -331,7 +331,7 @@ pub fn unwrap(self) -> T {
      */
     #[inline]
     pub fn take_unwrap(&mut self) -> T {
-        if self.is_none() { fail!("option::take_unwrap None") }
+        if self.is_none() { fail!("option::take_unwrap `None`") }
         self.take().unwrap()
     }
 
@@ -369,7 +369,7 @@ pub fn expect(self, reason: &str) -> T {
     pub fn get(self) -> T {
         match self {
           Some(x) => return x,
-          None => fail!("option::get None")
+          None => fail!("option::get `None`")
         }
     }
 
@@ -379,7 +379,7 @@ pub fn get_or_default(self, def: T) -> T {
         match self { Some(x) => x, None => def }
     }
 
-    /// Applies a function zero or more times until the result is None.
+    /// Applies a function zero or more times until the result is `None`.
     #[inline]
     pub fn while_some(self, blk: &fn(v: T) -> Option<T>) {
         let mut opt = self;