Skip to content

Commit 3a5d2cd

Browse files
committed
Fix Option camel case in comments
1 parent 7ff7489 commit 3a5d2cd

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

src/libcore/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub pure fn chain_ref<T, U>(opt: &Option<T>,
149149
#[inline(always)]
150150
pub pure fn or<T>(opta: Option<T>, optb: Option<T>) -> Option<T> {
151151
/*!
152-
* Returns the leftmost some() value, or none if both are none.
152+
* Returns the leftmost Some() value, or None if both are None.
153153
*/
154154
match move opta {
155155
Some(move opta) => Some(move opta),

src/librustc/middle/borrowck/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ variables from reassigned if there may be pointers to their interior)
114114
Finally, in some cases, both dangers can arise. For example, something
115115
like the following:
116116
117-
let mut x = ~some(5);
117+
let mut x = ~Some(5);
118118
match x {
119-
~some(ref y) => { ... }
120-
~none => { ... }
119+
~Some(ref y) => { ... }
120+
~None => { ... }
121121
}
122122
123123
In this case, if `x` to be reassigned or `*x` were to be mutated, then

src/librustc/middle/borrowck/preserve.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ priv impl &preserve_ctxt {
226226
//
227227
// As an example, consider this scenario:
228228
//
229-
// let mut x = @some(3);
230-
// match *x { Some(y) {...} none {...} }
229+
// let mut x = @Some(3);
230+
// match *x { Some(y) {...} None {...} }
231231
//
232232
// Technically, the value `x` need only be rooted
233233
// in the `some` arm. However, we evaluate `x` in trans
@@ -236,8 +236,8 @@ priv impl &preserve_ctxt {
236236
//
237237
// As a second example, consider *this* scenario:
238238
//
239-
// let x = @mut @some(3);
240-
// match x { @@some(y) {...} @@none {...} }
239+
// let x = @mut @Some(3);
240+
// match x { @@Some(y) {...} @@None {...} }
241241
//
242242
// Here again, `x` need only be rooted in the `some` arm.
243243
// In this case, the value which needs to be rooted is

src/librustc/middle/trans/type_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ fn type_of(cx: @crate_ctxt, t: ty::t) -> TypeRef {
100100
// Replace any typedef'd types with their equivalent non-typedef
101101
// type. This ensures that all LLVM nominal types that contain
102102
// Rust types are defined as the same LLVM types. If we don't do
103-
// this then, e.g. `option<{myfield: bool}>` would be a different
104-
// type than `option<myrec>`.
103+
// this then, e.g. `Option<{myfield: bool}>` would be a different
104+
// type than `Option<myrec>`.
105105
let t_norm = ty::normalize_ty(cx.tcx, t);
106106

107107
if t != t_norm {

src/libstd/net_tcp.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ fn read_future(sock: &TcpSocket, timeout_msecs: uint)
468468
* }
469469
* // this callback is ran when a new connection arrives
470470
* {|new_conn, kill_ch|
471-
* let cont_po = core::comm::port::<option<tcp_err_data>>();
471+
* let cont_po = core::comm::port::<Option<tcp_err_data>>();
472472
* let cont_ch = core::comm::chan(cont_po);
473473
* task::spawn {||
474474
* let accept_result = net::tcp::accept(new_conn);
@@ -484,9 +484,9 @@ fn read_future(sock: &TcpSocket, timeout_msecs: uint)
484484
* };
485485
* match core::comm::recv(cont_po) {
486486
* // shut down listen()
487-
* some(err_data) { core::comm::send(kill_chan, some(err_data)) }
487+
* Some(err_data) { core::comm::send(kill_chan, Some(err_data)) }
488488
* // wait for next connection
489-
* none {}
489+
* None {}
490490
* }
491491
* };
492492
* ~~~~~~~~~~~
@@ -593,7 +593,7 @@ pub fn accept(new_conn: TcpNewConnection)
593593
* callback's arguments are:
594594
* * `new_conn` - an opaque type that can be passed to
595595
* `net::tcp::accept` in order to be converted to a `tcp_socket`.
596-
* * `kill_ch` - channel of type `core::comm::chan<option<tcp_err_data>>`.
596+
* * `kill_ch` - channel of type `core::comm::chan<Option<tcp_err_data>>`.
597597
* this channel can be used to send a message to cause `listen` to begin
598598
* closing the underlying libuv data structures.
599599
*

src/libstd/rope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ pub mod node {
893893
* # Return value
894894
*
895895
* * `option::None` if no transformation happened
896-
* * `option::some(x)` otherwise, in which case `x` has the same contents
896+
* * `option::Some(x)` otherwise, in which case `x` has the same contents
897897
* as `node` bot lower height and/or fragmentation.
898898
*/
899899
pub fn bal(node: @Node) -> Option<@Node> {

src/libstd/timer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ pub fn sleep(iotask: IoTask, msecs: uint) {
100100
}
101101
102102
/**
103-
* Receive on a port for (up to) a specified time, then return an `option<T>`
103+
* Receive on a port for (up to) a specified time, then return an `Option<T>`
104104
*
105105
* This call will block to receive on the provided port for up to the
106106
* specified timeout. Depending on whether the provided port receives in that
107-
* time period, `recv_timeout` will return an `option<T>` representing the
107+
* time period, `recv_timeout` will return an `Option<T>` representing the
108108
* result.
109109
*
110110
* # Arguments
@@ -115,9 +115,9 @@ pub fn sleep(iotask: IoTask, msecs: uint) {
115115
*
116116
* # Returns
117117
*
118-
* An `option<T>` representing the outcome of the call. If the call `recv`'d
118+
* An `Option<T>` representing the outcome of the call. If the call `recv`'d
119119
* on the provided port in the allotted timeout period, then the result will
120-
* be a `some(T)`. If not, then `none` will be returned.
120+
* be a `Some(T)`. If not, then `None` will be returned.
121121
*/
122122
pub fn recv_timeout<T: Copy Owned>(iotask: IoTask,
123123
msecs: uint,

0 commit comments

Comments
 (0)