From b94279f4c56646e38bd0d413bdcbdefaa3401835 Mon Sep 17 00:00:00 2001 From: shulaoda <165626830+shulaoda@users.noreply.github.com> Date: Sat, 23 May 2026 05:53:27 +0800 Subject: [PATCH] refactor: apply clippy::get_first --- src/overflow.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/overflow.rs b/src/overflow.rs index 4230c89b57b..577095375b0 100644 --- a/src/overflow.rs +++ b/src/overflow.rs @@ -757,7 +757,7 @@ fn last_item_shape( shape: Shape, args_max_width: usize, ) -> Option { - if items.len() == 1 && !lists.get(0)?.is_nested_call() { + if items.len() == 1 && !lists.first()?.is_nested_call() { return Some(shape); } let offset = items @@ -808,7 +808,7 @@ pub(crate) fn maybe_get_args_offset( config: &Config, ) -> Option<(bool, usize)> { if let Some(&(_, num_args_before)) = args - .get(0)? + .first()? .special_cases(config) .find(|&&(s, _)| s == callee_str) {