Skip to content

Commit ea8e6c9

Browse files
committed
Convert box to Box::new()
See rust-lang/rust#20723
1 parent 548bbc8 commit ea8e6c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codegen/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919
pub fn get_writer(mut output_dir: Path, filename: &str) -> Box<Writer + 'static> {
2020
output_dir.push(filename);
2121
match File::open_mode(&output_dir, Truncate, Write) {
22-
Ok(writer) => box writer as Box<Writer>,
22+
Ok(writer) => Box::new(writer),
2323
Err(e) => panic!("Unable to write file: {}", e.desc),
2424
}
2525
}

0 commit comments

Comments
 (0)