fix(java): take the last diagnostic line with next_back (#5909)

lines.last() on the double-ended filter iterator tripped clippy::double_ended_iterator_last, failing the Rust checks on main; next_back() returns the same line.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-25 21:39:51 +08:00
1 джерело 42c7834023
коміт fe024713da
1 file changed
+1 -1
+1 -1
Переглянути файл
@@ -357,7 +357,7 @@ const GRADLE_TOOLING_FAILURES: [&str; 4] = [
fn launch_message(message: &str) -> String {
let mut lines = message.lines().map(str::trim).filter(|l| !l.is_empty());
let first = lines.next().unwrap_or_default();
match lines.last() {
match lines.next_back() {
Some(cause) if GRADLE_TOOLING_FAILURES.iter().any(|m| first.contains(m)) => format!("{first} Cause: {cause}"),
_ => first.to_owned(),
}