aya-tool: remove redundant let binding in generate function

Removed the unnecessary `let () = ` pattern when calling write_all
in the generate function. The pattern matching was redundant since
write_all returns () and we're already using unwrap() to handle errors.

This simplifies the code while maintaining the same functionality.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
reviewable/pr1308/r1
Xiaobo Liu 1 month ago
parent 44ec978bd3
commit 9d8db7c172

@ -64,7 +64,7 @@ pub fn generate<T: AsRef<str>>(
let dir = tempdir().unwrap();
let file_path = dir.path().join(name);
let mut file = File::create(&file_path).unwrap();
let () = file.write_all(c_header.as_bytes()).unwrap();
file.write_all(c_header.as_bytes()).unwrap();
let flags = combine_flags(&bindgen.command_line_flags(), &additional_flags);

Loading…
Cancel
Save