diff options
| author | bors <bors@rust-lang.org> | 2014-09-16 23:26:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-09-16 23:26:11 +0000 |
| commit | 0e784e16840e8a0c623cc6166de26da9334db3d6 (patch) | |
| tree | cb9ee37525225e3cbe4cda7d7954f2f72d24acb8 /src/libstd/path | |
| parent | ceb9bbfbf5933f9df238fecdd14e75304439c4f4 (diff) | |
| parent | fc525eeb4ec3443d29bce677f589b19f31c189bb (diff) | |
| download | rust-0e784e16840e8a0c623cc6166de26da9334db3d6.tar.gz rust-0e784e16840e8a0c623cc6166de26da9334db3d6.zip | |
auto merge of #17268 : aturon/rust/mut-conventions, r=alexcrichton
As per [RFC 52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md), use `_mut` suffixes to mark mutable variants, and `into_iter` for moving iterators. Additional details and motivation in the RFC. Note that the iterator *type* names are not changed by this RFC; those are awaiting a separate RFC for standardization. Closes #13660 Closes #16810 [breaking-change]
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/posix.rs | 4 | ||||
| -rw-r--r-- | src/libstd/path/windows.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 06eab31d7bf..c654d3a668a 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -382,7 +382,7 @@ impl Path { let n = if is_abs { comps.len() } else { comps.len() - 1} + comps.iter().map(|v| v.len()).sum(); let mut v = Vec::with_capacity(n); - let mut it = comps.move_iter(); + let mut it = comps.into_iter(); if !is_abs { match it.next() { None => (), @@ -1201,7 +1201,7 @@ mod tests { assert!(comps == exps, "components: Expected {:?}, found {:?}", comps, exps); let comps = path.components().rev().collect::<Vec<&[u8]>>(); - let exps = exps.move_iter().rev().collect::<Vec<&[u8]>>(); + let exps = exps.into_iter().rev().collect::<Vec<&[u8]>>(); assert!(comps == exps, "rev_components: Expected {:?}, found {:?}", comps, exps); } diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index d9864cfaa61..e68c8bdb07d 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -832,7 +832,7 @@ impl Path { Some(_) => s.push_str(prefix_), None => () } - let mut it = comps.move_iter(); + let mut it = comps.into_iter(); if !is_abs { match it.next() { None => (), |
