Skip to content

Commit 03a16db

Browse files
committed
std: fix the casing of option::{Some,None} in the docs
1 parent 2a68c71 commit 03a16db

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libstd/option.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ impl<T> Option<T> {
271271
pub fn get_ref<'a>(&'a self) -> &'a T {
272272
match *self {
273273
Some(ref x) => x,
274-
None => fail!("option::get_ref None")
274+
None => fail!("option::get_ref `None`"),
275275
}
276276
}
277277

@@ -293,7 +293,7 @@ impl<T> Option<T> {
293293
pub fn get_mut_ref<'a>(&'a mut self) -> &'a mut T {
294294
match *self {
295295
Some(ref mut x) => x,
296-
None => fail!("option::get_mut_ref None")
296+
None => fail!("option::get_mut_ref `None`"),
297297
}
298298
}
299299

@@ -317,7 +317,7 @@ impl<T> Option<T> {
317317
*/
318318
match self {
319319
Some(x) => x,
320-
None => fail!("option::unwrap None")
320+
None => fail!("option::unwrap `None`"),
321321
}
322322
}
323323

@@ -331,7 +331,7 @@ impl<T> Option<T> {
331331
*/
332332
#[inline]
333333
pub fn take_unwrap(&mut self) -> T {
334-
if self.is_none() { fail!("option::take_unwrap None") }
334+
if self.is_none() { fail!("option::take_unwrap `None`") }
335335
self.take().unwrap()
336336
}
337337

@@ -369,7 +369,7 @@ impl<T> Option<T> {
369369
pub fn get(self) -> T {
370370
match self {
371371
Some(x) => return x,
372-
None => fail!("option::get None")
372+
None => fail!("option::get `None`")
373373
}
374374
}
375375

@@ -379,7 +379,7 @@ impl<T> Option<T> {
379379
match self { Some(x) => x, None => def }
380380
}
381381

382-
/// Applies a function zero or more times until the result is None.
382+
/// Applies a function zero or more times until the result is `None`.
383383
#[inline]
384384
pub fn while_some(self, blk: &fn(v: T) -> Option<T>) {
385385
let mut opt = self;

0 commit comments

Comments
 (0)