Skip to content

Address io::io_error removal #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/codegen/keycode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ impl ToPrimitive for KeyCode {
for primitive_type in types.iter() {
out.write(format!("fn to_{}(&self) -> Option<{}> \\{
Some(self.code() as {})
\\}\n", *primitive_type, *primitive_type, *primitive_type).into_bytes())
\\}\n", *primitive_type, *primitive_type, *primitive_type).into_bytes());
}

out.write("
Expand Down
4 changes: 2 additions & 2 deletions src/codegen/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn main() {

pub fn get_writer(output_dir: &Path, filename: &str) -> ~BufferedWriter<File> {
match File::open_mode(&output_dir.join(filename), io::Truncate, io::Write) {
Some(writer) => ~BufferedWriter::new(writer),
None => fail!("Unable to write file"),
Ok(writer) => ~BufferedWriter::new(writer),
Err(e) => fail!("Unable to write file: {:s}", e.desc),
}
}
2 changes: 1 addition & 1 deletion src/codegen/scancode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ impl ToPrimitive for ScanCode {
for primitive_type in types.iter() {
out.write(format!("fn to_{}(&self) -> Option<{}> \\{
Some(self.code() as {})
\\}\n", *primitive_type, *primitive_type, *primitive_type).into_bytes())
\\}\n", *primitive_type, *primitive_type, *primitive_type).into_bytes());
}

out.write("
Expand Down