From 10df792d6efcbcf04edcb17ed2ea33bd9e746a35 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Mon, 23 Nov 2026 01:36:39 -0600 Subject: [PATCH] fix(atlas-core): use rfind for last path part in c8_profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clippy verdict run for #12919 (cargo clippy -p atlas-core --all-targets, nix develop, fresh CARGO_TARGET_DIR) reported one finding in the C8-M profile core: clippy::filter_next at c8_profile.rs:127 — filter(..).next_back() on a DoubleEndedIterator. Replaced with split('/').rfind(..), the exact form clippy suggests; semantics unchanged. Re-run after the fix: clippy exit 0 with zero c8_profile findings; cargo test -p atlas-core 353 passed / 0 failed. --- pkgs/atlas-search/crates/atlas-core/src/c8_profile.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/atlas-search/crates/atlas-core/src/c8_profile.rs b/pkgs/atlas-search/crates/atlas-core/src/c8_profile.rs index 524d6bdb17..b410a646c6 100644 --- a/pkgs/atlas-search/crates/atlas-core/src/c8_profile.rs +++ b/pkgs/atlas-search/crates/atlas-core/src/c8_profile.rs @@ -126,8 +126,7 @@ impl UrlParts { let last_path_part = path .split('/') - .filter(|segment| !segment.is_empty()) - .next_back() + .rfind(|segment| !segment.is_empty()) .map(str::to_string); let file_name = if path.ends_with('/') { None