From c6aaea6079f295c721b641f82b5f0f2a520490e3 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 23 Jan 2025 16:18:48 +0100 Subject: xa65: Fix minor style issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- crates/xa65/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/xa65/src/main.rs') diff --git a/crates/xa65/src/main.rs b/crates/xa65/src/main.rs index 85db01f..80aaac2 100644 --- a/crates/xa65/src/main.rs +++ b/crates/xa65/src/main.rs @@ -1,6 +1,6 @@ use std::fs::File; use std::io::prelude::*; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::process::Command; /// Version for this program. @@ -162,7 +162,7 @@ fn hexdump(bin: &PathBuf, src: &PathBuf, dst: &PathBuf) -> bool { ); return false; }; - if let Err(_) = nasm_file.write_all(nasm.stdout.as_slice()) { + if nasm_file.write_all(nasm.stdout.as_slice()).is_err() { println!( "xa65 (warning): could not produce an hexdump of '{}'", src.display() @@ -174,7 +174,7 @@ fn hexdump(bin: &PathBuf, src: &PathBuf, dst: &PathBuf) -> bool { // Attempt to generate 'hexdump' files for both binaries. If this is not // possible, then it will print a warning and return early. -fn attempt_hexdump(dir: &PathBuf) { +fn attempt_hexdump(dir: &Path) { let Some(bin) = find_binary("hexdump") else { println!( "xa65 (warning): could not find 'hexdump' in your PATH. \ -- cgit v1.2.3