diff options
| author | bors <bors@rust-lang.org> | 2015-01-29 05:47:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-29 05:47:21 +0000 |
| commit | bedd8108dc9b79402d1ea5349d766275f73398ff (patch) | |
| tree | 33580f180481d78ead16c7a8d3af4513968f4007 /src/libcore | |
| parent | c5961ad06d45689b44ff305c15d6ec7ec65755a9 (diff) | |
| parent | bce81e24647507c82e02e9918f54e8e3a2431149 (diff) | |
| download | rust-bedd8108dc9b79402d1ea5349d766275f73398ff.tar.gz rust-bedd8108dc9b79402d1ea5349d766275f73398ff.zip | |
Auto merge of #21680 - japaric:slice, r=alexcrichton
Replaces `slice_*` method calls with slicing syntax, and removes `as_slice()` calls that are redundant due to `Deref`.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/result.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/result.rs b/src/libcore/result.rs index ade257165c6..1af171ee7e3 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -455,7 +455,7 @@ impl<T, E> Result<T, E> { /// let line: IoResult<String> = buffer.read_line(); /// // Convert the string line to a number using `map` and `from_str` /// let val: IoResult<int> = line.map(|line| { - /// line.as_slice().trim_right().parse::<int>().unwrap_or(0) + /// line.trim_right().parse::<int>().unwrap_or(0) /// }); /// // Add the value if there were no errors, otherwise add 0 /// sum += val.ok().unwrap_or(0); |
