diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-07-23 21:29:02 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-07-27 23:41:10 -0700 |
| commit | 03a16dbb8e6341e622f7d09c9be99ec5502239f3 (patch) | |
| tree | e5b67424e54c79eeba5cebfeb2e42e31bec3b506 /src/libstd | |
| parent | 2a68c719f4a32123fbd428fe280f41af47d00fea (diff) | |
| download | rust-03a16dbb8e6341e622f7d09c9be99ec5502239f3.tar.gz rust-03a16dbb8e6341e622f7d09c9be99ec5502239f3.zip | |
std: fix the casing of option::{Some,None} in the docs
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/option.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/option.rs b/src/libstd/option.rs index eb3f227562a..ff35af4cff0 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -271,7 +271,7 @@ impl<T> Option<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 @@ impl<T> Option<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 @@ impl<T> Option<T> { */ match self { Some(x) => x, - None => fail!("option::unwrap None") + None => fail!("option::unwrap `None`"), } } @@ -331,7 +331,7 @@ impl<T> Option<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 @@ impl<T> Option<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 @@ impl<T> Option<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; |
