From 89eb9951958dc2cd652645cea5badf4bb9edc6f9 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 14 Jun 2013 19:40:11 -0700 Subject: librustc: Fix merge fallout. --- src/libstd/path.rs | 2 +- src/libstd/str.rs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/path.rs b/src/libstd/path.rs index b3b696a9a60..9b4a3270f28 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -21,7 +21,7 @@ use cmp::Eq; use iterator::IteratorUtil; use libc; use option::{None, Option, Some}; -use str::{Str, StrSlice, StrVector}; +use str::{OwnedStr, Str, StrSlice, StrVector}; use str; use to_str::ToStr; use ascii::{AsciiCast, AsciiStr}; diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 9c94f36fba3..3c512d9bfd2 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -1427,7 +1427,8 @@ impl<'self> StrSlice<'self> for &'self str { fn slice_chars(&self, begin: uint, end: uint) -> &'self str { assert!(begin <= end); // not sure how to use the iterators for this nicely. - let mut (position, count) = (0, 0); + let mut position = 0; + let mut count = 0; let l = self.len(); while count < begin && position < l { position = self.char_range_at(position).next; @@ -1575,7 +1576,8 @@ impl<'self> StrSlice<'self> for &'self str { * The original string with all occurances of `from` replaced with `to` */ pub fn replace(&self, from: &str, to: &str) -> ~str { - let mut (result, last_end) = (~"", 0); + let mut result = ~""; + let mut last_end = 0; for self.matches_index_iter(from).advance |(start, end)| { result.push_str(unsafe{raw::slice_bytes(*self, last_end, start)}); result.push_str(to); -- cgit 1.4.1-3-g733a5