From af48f305421ae40bdcc8df7af168f8cfefc9bb86 Mon Sep 17 00:00:00 2001 From: Ted Horst Date: Sun, 30 Dec 2012 11:54:44 -0600 Subject: [PATCH] use newtype struct for devnull rather than type aliased record --- src/test/bench/shootout-mandelbrot.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs index 7fe572b64f8..6133f9befcf 100644 --- a/src/test/bench/shootout-mandelbrot.rs +++ b/src/test/bench/shootout-mandelbrot.rs @@ -96,9 +96,9 @@ fn chanmb(i: uint, size: uint) -> Line Line {i:i, b:crv} } -type devnull = {dn: int}; +struct Devnull(); -impl devnull: io::Writer { +impl Devnull: io::Writer { fn write(&self, _b: &[const u8]) {} fn seek(&self, _i: int, _s: io::SeekStyle) {} fn tell(&self) -> uint {0_u} @@ -110,7 +110,7 @@ fn writer(path: ~str, pport: pipes::Port, size: uint) { let cout: io::Writer = match path { ~"" => { - {dn: 0} as io::Writer + Devnull as io::Writer } ~"-" => { io::stdout()