Skip to content

Commit af48f30

Browse files
tedhorstcatamorphism
authored andcommitted
use newtype struct for devnull rather than type aliased record
1 parent 7c79b5e commit af48f30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/bench/shootout-mandelbrot.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ fn chanmb(i: uint, size: uint) -> Line
9696
Line {i:i, b:crv}
9797
}
9898

99-
type devnull = {dn: int};
99+
struct Devnull();
100100

101-
impl devnull: io::Writer {
101+
impl Devnull: io::Writer {
102102
fn write(&self, _b: &[const u8]) {}
103103
fn seek(&self, _i: int, _s: io::SeekStyle) {}
104104
fn tell(&self) -> uint {0_u}
@@ -110,7 +110,7 @@ fn writer(path: ~str, pport: pipes::Port<Line>, size: uint)
110110
{
111111
let cout: io::Writer = match path {
112112
~"" => {
113-
{dn: 0} as io::Writer
113+
Devnull as io::Writer
114114
}
115115
~"-" => {
116116
io::stdout()

0 commit comments

Comments
 (0)