Skip to content

Commit

Permalink
Convert box to Box::new()
Browse files Browse the repository at this point in the history
  • Loading branch information
alkor committed Jan 11, 2015
1 parent 548bbc8 commit ea8e6c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codegen/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() {
pub fn get_writer(mut output_dir: Path, filename: &str) -> Box<Writer + 'static> {
output_dir.push(filename);
match File::open_mode(&output_dir, Truncate, Write) {
Ok(writer) => box writer as Box<Writer>,
Ok(writer) => Box::new(writer),
Err(e) => panic!("Unable to write file: {}", e.desc),
}
}

0 comments on commit ea8e6c9

Please sign in to comment.