diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-07-08 20:45:05 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-07-08 21:09:42 +0200 |
| commit | 6333dc7ee02332cd06e20b56cefd3210368e54f8 (patch) | |
| tree | bc32b202172fc1d3981da50e7d0a085aa64252f3 /lib/xixanta/src/cfg.rs | |
| parent | 5fca76b56034554d965b77d1485f92685d79bc84 (diff) | |
| download | tools.nes-6333dc7ee02332cd06e20b56cefd3210368e54f8.tar.gz tools.nes-6333dc7ee02332cd06e20b56cefd3210368e54f8.zip | |
Upgrade to the 2024 edition of Rust
And also adjust the code so the clippy from the 2024 edition is fine
with it.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/xixanta/src/cfg.rs')
| -rw-r--r-- | lib/xixanta/src/cfg.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/xixanta/src/cfg.rs b/lib/xixanta/src/cfg.rs index 57781f2..52e075e 100644 --- a/lib/xixanta/src/cfg.rs +++ b/lib/xixanta/src/cfg.rs @@ -104,10 +104,9 @@ fn fetch_memory_definition(line: &str, line_num: usize) -> Result<RawMapping, St match key.trim() { "file" => res.ignore = val != "%O", - "fill" - if res.fill.is_none() => { - res.fill = Some(String::from("")); - } + "fill" if res.fill.is_none() => { + res.fill = Some(String::from("")); + } "fillval" => res.fill = Some(val.to_string()), "start" => res.start = val.to_string(), "size" => res.size = val.to_string(), @@ -199,7 +198,7 @@ pub fn parse_cfg_file(text: &str) -> Result<Vec<Mapping>, String> { return Err(format!( "line does not end with a semicolon (line {})", idx + 1 - )) + )); } }; @@ -240,7 +239,7 @@ pub fn parse_cfg_file(text: &str) -> Result<Vec<Mapping>, String> { return Err(format!( "section must end with an opening bracket (line {})", idx + 1 - )) + )); } }; } @@ -333,7 +332,7 @@ pub fn parse_nasm_cfg_file(text: &str) -> Result<Vec<Mapping>, String> { return Err(format!( "line does not end with a semicolon (line {})", idx + 1 - )) + )); } }; |
