diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-11 14:12:50 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-11 14:17:59 -0700 |
| commit | 5a8ba073bcd6ee6fd34ff545845a746cddc4904f (patch) | |
| tree | ac61c449c7178937914d59a8c6c84bed74a52bd8 /src/libcore/path.rs | |
| parent | 41bce91cb871ba90caf7d3e56243141dd3390bca (diff) | |
Make to_str pure and fix const parameters for str-mutating functions
Two separate changes that got intertwined (sorry): Make to_str pure. Closes #3691 In str, change functions like push_char to take an &mut str instead of an &str. Closes #3710
Diffstat (limited to 'src/libcore/path.rs')
| -rw-r--r-- | src/libcore/path.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/path.rs b/src/libcore/path.rs index 6d023ed1bfb..e5d2397da0d 100644 --- a/src/libcore/path.rs +++ b/src/libcore/path.rs @@ -61,7 +61,7 @@ pub pure fn Path(s: &str) -> Path { } impl PosixPath : ToStr { - fn to_str() -> ~str { + pure fn to_str() -> ~str { let mut s = ~""; if self.is_absolute { s += "/"; @@ -236,7 +236,7 @@ impl PosixPath : GenericPath { impl WindowsPath : ToStr { - fn to_str() -> ~str { + pure fn to_str() -> ~str { let mut s = ~""; match self.host { Some(ref h) => { s += "\\\\"; s += *h; } |
