Skip to content

Commit f91c9b6

Browse files
varphoneemilio
authored andcommitted
Cleanup some clippy::unused_io_amount errors
1 parent 53290e8 commit f91c9b6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ impl Builder {
13911391

13921392
{
13931393
let mut wrapper_file = File::create(&wrapper_path)?;
1394-
wrapper_file.write(wrapper_contents.as_bytes())?;
1394+
wrapper_file.write_all(wrapper_contents.as_bytes())?;
13951395
}
13961396

13971397
let mut cmd = Command::new(&clang.path);
@@ -2088,30 +2088,30 @@ impl Bindings {
20882088
"/* automatically generated by rust-bindgen {} */\n\n",
20892089
version.unwrap_or("(unknown version)")
20902090
);
2091-
writer.write(header.as_bytes())?;
2091+
writer.write_all(header.as_bytes())?;
20922092
}
20932093

20942094
for line in self.options.raw_lines.iter() {
2095-
writer.write(line.as_bytes())?;
2096-
writer.write("\n".as_bytes())?;
2095+
writer.write_all(line.as_bytes())?;
2096+
writer.write_all("\n".as_bytes())?;
20972097
}
20982098

20992099
if !self.options.raw_lines.is_empty() {
2100-
writer.write("\n".as_bytes())?;
2100+
writer.write_all("\n".as_bytes())?;
21012101
}
21022102

21032103
let bindings = self.module.to_string();
21042104

21052105
match self.rustfmt_generated_string(&bindings) {
21062106
Ok(rustfmt_bindings) => {
2107-
writer.write(rustfmt_bindings.as_bytes())?;
2107+
writer.write_all(rustfmt_bindings.as_bytes())?;
21082108
}
21092109
Err(err) => {
21102110
eprintln!(
21112111
"Failed to run rustfmt: {} (non-fatal, continuing)",
21122112
err
21132113
);
2114-
writer.write(bindings.as_bytes())?;
2114+
writer.write_all(bindings.as_bytes())?;
21152115
}
21162116
}
21172117
Ok(())

0 commit comments

Comments
 (0)