From a4c797f8c10c2fcdc8f47b6b03649de117653426 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 23 Mar 2022 15:41:55 +0100 Subject: [PATCH] appease clippy --- Cargo.lock | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e508132..5a249c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,7 +62,7 @@ dependencies = [ [[package]] name = "flip-link" -version = "0.1.5" +version = "0.1.6" dependencies = [ "assert_cmd", "env_logger", diff --git a/src/main.rs b/src/main.rs index a1cbceb..02e189f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -325,7 +325,7 @@ fn find_ram_in_linker_script(linker_script: &str) -> Option { for segment in segments { let boundary_pos = segment .find(|c| c == 'K' || c == 'M') - .unwrap_or_else(|| segment.len()); + .unwrap_or(segment.len()); let length: u64 = tryc!(segment[..boundary_pos].parse()); let raw = &segment[boundary_pos..]; let mut chars = raw.chars();