Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 1f5a88a

Browse files
committed
refactor: get(0) -> first()
1 parent 4cc9c15 commit 1f5a88a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/rust-analyzer/crates/ide/src/goto_definition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ fn find_from_definition(
179179
// FIXME: This condition does not work for complicated cases such as
180180
// receiver_type: Vec<i64>
181181
// arg.ty(): T: IntoIterator<Item = i64>
182-
args.get(0).is_some_and(|arg| receiver_type.could_coerce_to(db, arg.ty()))
182+
args.first().is_some_and(|arg| receiver_type.could_coerce_to(db, arg.ty()))
183183
})?;
184184

185185
let def = Definition::from(target_method);

0 commit comments

Comments
 (0)