Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #91 from serde-rs/cast
Browse files Browse the repository at this point in the history
Remove unneeded cast
  • Loading branch information
dtolnay authored Aug 19, 2016
2 parents 9531575 + 641f0c4 commit 9d86db2
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions syntex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extern crate syntex_syntax;
extern crate syntex_errors as errors;

use std::fs::File;
use std::io::{self, Write};
use std::io::Write;
use std::path::Path;

use syntex_syntax::ast;
Expand Down Expand Up @@ -240,20 +240,15 @@ impl Registry {
let mut out = Vec::new();
let annotation = pprust::NoAnn;

{
let out: &mut io::Write = &mut out;

try!(pprust::print_crate(
sess.codemap(),
&sess.span_diagnostic,
&krate,
src_name,
&mut rdr,
Box::new(out),
&annotation,
false)
);
}
try!(pprust::print_crate(
sess.codemap(),
&sess.span_diagnostic,
&krate,
src_name,
&mut rdr,
Box::new(&mut out),
&annotation,
false));

Ok(out)
}
Expand Down

0 comments on commit 9d86db2

Please sign in to comment.