Skip to content

Commit 8337fa1

Browse files
committed
Camel case the option type
1 parent d9a6a63 commit 8337fa1

File tree

330 files changed

+4939
-4936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+4939
-4936
lines changed

doc/rust.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,14 @@ An example of imports:
842842
import foo = core::info;
843843
import core::float::sin;
844844
import core::str::{slice, to_upper};
845-
import core::option::some;
845+
import core::option::Some;
846846
847847
fn main() {
848848
// Equivalent to 'log(core::info, core::float::sin(1.0));'
849849
log(foo, sin(1.0));
850850
851-
// Equivalent to 'log(core::info, core::option::some(1.0));'
852-
log(info, some(1.0));
851+
// Equivalent to 'log(core::info, core::option::Some(1.0));'
852+
log(info, Some(1.0));
853853
854854
// Equivalent to 'log(core::info,
855855
// core::str::to_upper(core::str::slice(~"foo", 0u, 1u)));'
@@ -2229,14 +2229,14 @@ consist of a bool-typed expression following the `if` keyword. A pattern
22292229
guard may refer to the variables bound within the pattern they follow.
22302230

22312231
~~~~
2232-
# let maybe_digit = some(0);
2232+
# let maybe_digit = Some(0);
22332233
# fn process_digit(i: int) { }
22342234
# fn process_other(i: int) { }
22352235
22362236
let message = match maybe_digit {
2237-
some(x) if x < 10 => process_digit(x),
2238-
some(x) => process_other(x),
2239-
none => fail
2237+
Some(x) if x < 10 => process_digit(x),
2238+
Some(x) => process_other(x),
2239+
None => fail
22402240
};
22412241
~~~~
22422242

doc/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,7 @@ Rust's type inferrer works very well with generics, but there are
19641964
programs that just can't be typed.
19651965

19661966
~~~~
1967-
let n = option::none;
1967+
let n = option::None;
19681968
# option::iter(n, fn&(&&x:int) {})
19691969
~~~~
19701970

@@ -1974,9 +1974,9 @@ you really want to have such a statement, you'll have to write it like
19741974
this:
19751975

19761976
~~~~
1977-
let n2: option<int> = option::none;
1977+
let n2: Option<int> = option::None;
19781978
// or
1979-
let n = option::none::<int>;
1979+
let n = option::None::<int>;
19801980
~~~~
19811981

19821982
Note that, in a value expression, `<` already has a meaning as a

0 commit comments

Comments
 (0)