diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-23 16:18:48 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-23 16:18:48 +0100 |
| commit | c6aaea6079f295c721b641f82b5f0f2a520490e3 (patch) | |
| tree | 903a10d324eca9af2293e0ffe7ddb0b9c5fa3348 /crates | |
| parent | 121995bf3f21343848bd3b1d189529883e71044a (diff) | |
| download | tools.nes-c6aaea6079f295c721b641f82b5f0f2a520490e3.tar.gz tools.nes-c6aaea6079f295c721b641f82b5f0f2a520490e3.zip | |
xa65: Fix minor style issues
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/xa65/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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. \ |
