diff options
| author | bors <bors@rust-lang.org> | 2014-05-15 23:26:26 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-15 23:26:26 -0700 |
| commit | b545a499fad8d58f858e7c14bcdc90171b97efdf (patch) | |
| tree | e4bebf36fa24fe0fe4dd6846291c59520ef1be28 /src/libregex | |
| parent | 84406d438c6c49aa63875096e5f3cca1a3879f17 (diff) | |
| parent | 2e2160b026d7a2b2d13c3a2b4d6aa073ab3ff43f (diff) | |
| download | rust-b545a499fad8d58f858e7c14bcdc90171b97efdf.tar.gz rust-b545a499fad8d58f858e7c14bcdc90171b97efdf.zip | |
auto merge of #14115 : alexcrichton/rust/core-fmt, r=brson
This was a more difficult change than I thought it would be, and it is unfortunately a breaking change rather than a drop-in replacement. Most of the rationale can be found in the third commit. cc #13851
Diffstat (limited to 'src/libregex')
| -rw-r--r-- | src/libregex/parse.rs | 2 | ||||
| -rw-r--r-- | src/libregex/re.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libregex/parse.rs b/src/libregex/parse.rs index d1a01cc974f..a695da9fa16 100644 --- a/src/libregex/parse.rs +++ b/src/libregex/parse.rs @@ -37,7 +37,7 @@ pub struct Error { impl fmt::Show for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f.buf, "Regex syntax error near position {}: {}", + write!(f, "Regex syntax error near position {}: {}", self.pos, self.msg) } } diff --git a/src/libregex/re.rs b/src/libregex/re.rs index f22889b22a3..899c54d601b 100644 --- a/src/libregex/re.rs +++ b/src/libregex/re.rs @@ -117,7 +117,7 @@ pub struct Regex { impl fmt::Show for Regex { /// Shows the original regular expression. fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f.buf, "{}", self.original) + write!(f, "{}", self.original) } } |
