Skip to content

Commit aaef60e

Browse files
committed
---
yaml --- r: 21950 b: refs/heads/snap-stage3 c: 5cd9d4d h: refs/heads/master v: v3
1 parent 8f84383 commit aaef60e

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d6e731d823795104940229a191d956bf02a7100c
4+
refs/heads/snap-stage3: 5cd9d4d9dd31f3b575d6975e574eb49df39e936a
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/io.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ struct BytesWriter {
687687
mut pos: uint,
688688
}
689689
690-
impl @BytesWriter: Writer {
690+
impl BytesWriter: Writer {
691691
fn write(v: &[const u8]) {
692692
do self.buf.swap |buf| {
693693
let mut buf <- buf;
@@ -716,12 +716,20 @@ impl @BytesWriter: Writer {
716716
fn get_type() -> WriterType { File }
717717
}
718718
719-
fn BytesWriter() -> @BytesWriter {
720-
@BytesWriter { buf: DVec(), mut pos: 0u }
719+
impl @BytesWriter : Writer {
720+
fn write(v: &[const u8]) { (*self).write(v) }
721+
fn seek(offset: int, whence: SeekStyle) { (*self).seek(offset, whence) }
722+
fn tell() -> uint { (*self).tell() }
723+
fn flush() -> int { (*self).flush() }
724+
fn get_type() -> WriterType { (*self).get_type() }
725+
}
726+
727+
fn BytesWriter() -> BytesWriter {
728+
BytesWriter { buf: DVec(), mut pos: 0u }
721729
}
722730
723731
fn with_bytes_writer(f: fn(Writer)) -> ~[u8] {
724-
let wr = BytesWriter();
732+
let wr = @BytesWriter();
725733
f(wr as Writer);
726734
wr.buf.check_out(|buf| buf)
727735
}

branches/snap-stage3/src/rustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ const metadata_encoding_version : &[u8] = &[0x72, //'r' as u8,
10931093
0, 0, 0, 1 ];
10941094

10951095
fn encode_metadata(parms: encode_parms, crate: @crate) -> ~[u8] {
1096-
let wr = io::BytesWriter();
1096+
let wr = @io::BytesWriter();
10971097
let stats =
10981098
{mut inline_bytes: 0,
10991099
mut attr_bytes: 0,

0 commit comments

Comments
 (0)