core: convert ToStr::to_str to take explicit &self
This commit is contained in:
parent
9556629da2
commit
9adfa59d8e
26 changed files with 88 additions and 72 deletions
|
@ -368,7 +368,7 @@ impl Path {
|
|||
}
|
||||
|
||||
impl PosixPath : ToStr {
|
||||
pure fn to_str() -> ~str {
|
||||
pure fn to_str(&self) -> ~str {
|
||||
let mut s = ~"";
|
||||
if self.is_absolute {
|
||||
s += "/";
|
||||
|
@ -531,7 +531,7 @@ impl PosixPath : GenericPath {
|
|||
|
||||
|
||||
impl WindowsPath : ToStr {
|
||||
pure fn to_str() -> ~str {
|
||||
pure fn to_str(&self) -> ~str {
|
||||
let mut s = ~"";
|
||||
match self.host {
|
||||
Some(ref h) => { s += "\\\\"; s += *h; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue