Skip to content

Commit 42c31c3

Browse files
hatahetalexcrichton
authored andcommitted
---
yaml --- r: 106071 b: refs/heads/auto c: c297cff h: refs/heads/master i: 106069: 81a2cb3 106067: 63b7401 106063: e383245 v: v3
1 parent 0370c97 commit 42c31c3

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 175bf9470a2f1b95215b4b5dc1f12d949a0f8ddd
16+
refs/heads/auto: c297cff7771a84c417913b2023353cf44f9e260c
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libstd/option.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl<T> Option<T> {
149149
}
150150
}
151151

152-
/// Returns the contained value or a default
152+
/// Returns the contained value or a default.
153153
#[inline]
154154
pub fn unwrap_or(self, def: T) -> T {
155155
match self {
@@ -158,7 +158,7 @@ impl<T> Option<T> {
158158
}
159159
}
160160

161-
/// Returns the contained value or computes it from a closure
161+
/// Returns the contained value or computes it from a closure.
162162
#[inline]
163163
pub fn unwrap_or_else(self, f: || -> T) -> T {
164164
match self {
@@ -183,7 +183,7 @@ impl<T> Option<T> {
183183
match self { None => def, Some(t) => f(t) }
184184
}
185185

186-
/// Apply a function to the contained value or do nothing.
186+
/// Applies a function to the contained value or does nothing.
187187
/// Returns true if the contained value was mutated.
188188
pub fn mutate(&mut self, f: |T| -> T) -> bool {
189189
if self.is_some() {
@@ -192,7 +192,7 @@ impl<T> Option<T> {
192192
} else { false }
193193
}
194194

195-
/// Apply a function to the contained value or set it to a default.
195+
/// Applies a function to the contained value or sets it to a default.
196196
/// Returns true if the contained value was mutated, or false if set to the default.
197197
pub fn mutate_or_set(&mut self, def: T, f: |T| -> T) -> bool {
198198
if self.is_some() {
@@ -208,19 +208,19 @@ impl<T> Option<T> {
208208
// Iterator constructors
209209
/////////////////////////////////////////////////////////////////////////
210210

211-
/// Return an iterator over the possibly contained value
211+
/// Returns an iterator over the possibly contained value.
212212
#[inline]
213213
pub fn iter<'r>(&'r self) -> Item<&'r T> {
214214
Item{opt: self.as_ref()}
215215
}
216216

217-
/// Return a mutable iterator over the possibly contained value
217+
/// Returns a mutable iterator over the possibly contained value.
218218
#[inline]
219219
pub fn mut_iter<'r>(&'r mut self) -> Item<&'r mut T> {
220220
Item{opt: self.as_mut()}
221221
}
222222

223-
/// Return a consuming iterator over the possibly contained value
223+
/// Returns a consuming iterator over the possibly contained value.
224224
#[inline]
225225
pub fn move_iter(self) -> Item<T> {
226226
Item{opt: self}
@@ -264,15 +264,15 @@ impl<T> Option<T> {
264264
pub fn or_else(self, f: || -> Option<T>) -> Option<T> {
265265
match self {
266266
Some(_) => self,
267-
None => f(),
267+
None => f()
268268
}
269269
}
270270

271271
/////////////////////////////////////////////////////////////////////////
272272
// Misc
273273
/////////////////////////////////////////////////////////////////////////
274274

275-
/// Take the value out of the option, leaving a `None` in its place.
275+
/// Takes the value out of the option, leaving a `None` in its place.
276276
#[inline]
277277
pub fn take(&mut self) -> Option<T> {
278278
mem::replace(self, None)
@@ -282,7 +282,7 @@ impl<T> Option<T> {
282282
#[inline(always)]
283283
pub fn filtered(self, f: |t: &T| -> bool) -> Option<T> {
284284
match self {
285-
Some(x) => if f(&x) {Some(x)} else {None},
285+
Some(x) => if f(&x) { Some(x) } else { None },
286286
None => None
287287
}
288288
}

0 commit comments

Comments
 (0)