core: convert ToStr::to_str to take explicit &self

This commit is contained in:
Erick Tryzelaar
2013-02-03 20:47:26 -08:00
parent 9556629da2
commit 9adfa59d8e
26 changed files with 88 additions and 72 deletions

View File

@@ -1172,11 +1172,11 @@ impl <A: ToJson> Option<A>: ToJson {
}
impl Json: to_str::ToStr {
pure fn to_str() -> ~str { to_str(&self) }
pure fn to_str(&self) -> ~str { to_str(self) }
}
impl Error: to_str::ToStr {
pure fn to_str() -> ~str {
pure fn to_str(&self) -> ~str {
fmt!("%u:%u: %s", self.line, self.col, *self.msg)
}
}