Skip to content

Commit 06f75c4

Browse files
committed
fix tests
1 parent 4a13a6f commit 06f75c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/ty_ide/src/signature_help.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ fn create_signature_details_from_call_signature_details(
149149
details
150150
.argument_to_parameter_mapping
151151
.get(current_arg_index)
152-
.and_then(|&param_index| param_index)
152+
.and_then(|param_index| param_index.first().copied())
153153
.or({
154154
// If we can't find a mapping for this argument, but we have a current
155155
// argument index, use that as the active parameter if it's within bounds.
@@ -246,7 +246,7 @@ fn find_active_signature_from_details(signature_details: &[CallSignatureDetails]
246246
details
247247
.argument_to_parameter_mapping
248248
.iter()
249-
.all(Option::is_some)
249+
.all(|mapping| !mapping.is_empty())
250250
});
251251

252252
if let Some(index) = perfect_match {
@@ -261,7 +261,7 @@ fn find_active_signature_from_details(signature_details: &[CallSignatureDetails]
261261
details
262262
.argument_to_parameter_mapping
263263
.iter()
264-
.filter(|mapping| mapping.is_some())
264+
.filter(|mapping| !mapping.is_empty())
265265
.count()
266266
})?;
267267

0 commit comments

Comments
 (0)