diff --git a/src/cache/mod.rs b/src/cache/mod.rs index 19c599b..cb401dd 100644 --- a/src/cache/mod.rs +++ b/src/cache/mod.rs @@ -523,7 +523,7 @@ fn iterate_without_lines<'a>( } fn extract_class_name(full_path: &str) -> Option<&str> { - let after_last_period = full_path.split('.').last()?; + let after_last_period = full_path.split('.').next_back()?; // If the class is an inner class, we need to extract the outer class name after_last_period.split('$').next() } diff --git a/src/mapper.rs b/src/mapper.rs index 3467468..78c1efc 100644 --- a/src/mapper.rs +++ b/src/mapper.rs @@ -109,7 +109,7 @@ impl<'m> Iterator for RemappedFrameIter<'m> { } fn extract_class_name(full_path: &str) -> Option<&str> { - let after_last_period = full_path.split('.').last()?; + let after_last_period = full_path.split('.').next_back()?; // If the class is an inner class, we need to extract the outer class name after_last_period.split('$').next() }