Skip to content

Commit

Permalink
use newtype struct for devnull rather than type aliased record
Browse files Browse the repository at this point in the history
  • Loading branch information
tedhorst authored and catamorphism committed Jan 2, 2013
1 parent 7c79b5e commit af48f30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/bench/shootout-mandelbrot.rs
Expand Up @@ -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}
Expand All @@ -110,7 +110,7 @@ fn writer(path: ~str, pport: pipes::Port<Line>, size: uint)
{
let cout: io::Writer = match path {
~"" => {
{dn: 0} as io::Writer
Devnull as io::Writer
}
~"-" => {
io::stdout()
Expand Down

0 comments on commit af48f30

Please sign in to comment.