From 11790d769b9dc651f3218bdfe40da59c7c9d400e Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 24 Apr 2026 15:04:10 +0200 Subject: Update the code style to the latest stable Rust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This mostly involves applying the collapsible_match rule[1] where appropiate, and using sort_by_key() as pointed out by the latest stable version of clippy. [1] https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_match Signed-off-by: Miquel Sabaté Solà --- crates/nasm/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/nasm/src/main.rs') diff --git a/crates/nasm/src/main.rs b/crates/nasm/src/main.rs index 007b897..63d7e9d 100644 --- a/crates/nasm/src/main.rs +++ b/crates/nasm/src/main.rs @@ -216,7 +216,7 @@ fn save_memory_stats(source: &SourceInfo, memory: &mut MemoryResult, has_working }; let ranges = &mut memory.memory_ranges; - ranges.sort_by(|a, b| a.range.start.cmp(&b.range.start)); + ranges.sort_by_key(|a| a.range.start); for mr in ranges { if mr.range.start + 1 == mr.range.end { -- cgit v1.2.3