diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-07-14 07:37:38 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-07-14 07:37:38 +0200 |
| commit | 10b2276829b31c117eb3276dca11503248801cdd (patch) | |
| tree | f40746dda85c5a4fb48bd4ea4ab27ed795eea2ff /crates | |
| parent | 1fcfa6b2bdafb797175d0c3a1be2bca700d4c260 (diff) | |
| download | tools.nes-10b2276829b31c117eb3276dca11503248801cdd.tar.gz tools.nes-10b2276829b31c117eb3276dca11503248801cdd.zip | |
nasm: code style cleanup
In the same spirit as commit a012d260db4a ("Minor style fixes from an
upgraded clippy"), an update on the toolchain has raised some concerns
style-wise.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/nasm/src/main.rs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/crates/nasm/src/main.rs b/crates/nasm/src/main.rs index e8f56f6..55a8f21 100644 --- a/crates/nasm/src/main.rs +++ b/crates/nasm/src/main.rs @@ -1,10 +1,10 @@ use header::Header; -use std::fs::{create_dir, File}; +use std::fs::{File, create_dir}; use std::io::{self, BufWriter, Write}; use std::path::{Path, PathBuf}; -use xixanta::assembler::{assemble, MemoryResult}; -use xixanta::mapping::Mapping; use xixanta::SourceInfo; +use xixanta::assembler::{MemoryResult, assemble}; +use xixanta::mapping::Mapping; /// Version for this program. const VERSION: &str = "0.1.0"; @@ -31,13 +31,17 @@ fn print_help() { println!("Options:"); println!(" -a, --asan\t\tEnable the Address Sanitizer."); println!(" --allow-unused\tAllow unused .proc's or unreferenced objects."); - println!(" -c, --config <FILE>\tLinker configuration to be used, whether an identifier or a file path."); + println!( + " -c, --config <FILE>\tLinker configuration to be used, whether an identifier or a file path." + ); println!( " -D <NAME>(=VALUE)\tDefine an 8-bit variable on the global scope ('VALUE' defaults to '1')" ); println!(" -h, --help\t\tPrint this message."); println!(" -o, --out <FILE>\tFile path where the output should be located after execution."); - println!(" --prelude\t\tPrint the 'prelude' file; a file that can be used for defining default implementations for nasm-only features."); + println!( + " --prelude\t\tPrint the 'prelude' file; a file that can be used for defining default implementations for nasm-only features." + ); println!(" -s, --stats\t\tPrint the statistics on the final layout of segments and memory."); println!(" --split-segments\tSave each segment into a different file named {{SEGMENT}}.out"); println!(" --stdout\t\tPrint the output binary to the standard output."); @@ -208,9 +212,10 @@ fn get_directory_from_source(source: &SourceInfo) -> PathBuf { let dir = find_git_directory(source).join(".nasm"); if !dir.exists() - && let Err(e) = create_dir(&dir) { - die(e.to_string()); - } + && let Err(e) = create_dir(&dir) + { + die(e.to_string()); + } dir } |
