From 6333dc7ee02332cd06e20b56cefd3210368e54f8 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 8 Jul 2026 20:45:05 +0200 Subject: Upgrade to the 2024 edition of Rust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And also adjust the code so the clippy from the 2024 edition is fine with it. Signed-off-by: Miquel Sabaté Solà --- lib/xixanta/src/cfg.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/xixanta/src/cfg.rs') 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 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, 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, 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, String> { return Err(format!( "line does not end with a semicolon (line {})", idx + 1 - )) + )); } }; -- cgit v1.2.3