From 9bae6ec828fdc7f87838ee008cccef90e31b9f84 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 30 Apr 2014 23:06:36 -0700 Subject: core: Inherit possible string functionality This moves as much allocation as possible from teh std::str module into core::str. This includes essentially all non-allocating functionality, mostly iterators and slicing and such. This primarily splits the Str trait into only having the as_slice() method, adding a new StrAllocating trait to std::str which contains the relevant new allocation methods. This is a breaking change if any of the methods of "trait Str" were overriden. The old functionality can be restored by implementing both the Str and StrAllocating traits. [breaking-change] --- src/libstd/path/windows.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 758a76167cd..f21fbe1b6e6 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -21,7 +21,7 @@ use io::Writer; use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Rev, Iterator, Map}; use option::{Option, Some, None}; use slice::{Vector, OwnedVector, ImmutableVector}; -use str::{CharSplits, Str, StrVector, StrSlice}; +use str::{CharSplits, Str, StrAllocating, StrVector, StrSlice}; use strbuf::StrBuf; use vec::Vec; @@ -684,7 +684,7 @@ impl Path { } } - fn normalize_(s: S) -> (Option, StrBuf) { + fn normalize_(s: S) -> (Option, StrBuf) { // make borrowck happy let (prefix, val) = { let prefix = parse_prefix(s.as_slice()); @@ -842,7 +842,7 @@ impl Path { } fn update_normalized(&mut self, s: S) { - let (prefix, path) = Path::normalize_(s); + let (prefix, path) = Path::normalize_(s.as_slice()); self.repr = path; self.prefix = prefix; self.update_sepidx(); -- cgit 1.4.1-3-g733a5