diff options
author | 林炳权 <695601626@qq.com> | 2024-01-02 06:22:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-01 23:22:48 +0100 |
commit | 96b581bdd2bedb31aa51c0a992686f27ed1a1f10 (patch) | |
tree | 3e141ed70531ff37f93eb25d4ae135b97f14b7a1 /cli/lsp/testing/collectors.rs | |
parent | 7e72f3af6152d4b62c2ea94d025dfa297a6b0cb4 (diff) |
chore: update to Rust 1.75 (#21731)
Diffstat (limited to 'cli/lsp/testing/collectors.rs')
-rw-r--r-- | cli/lsp/testing/collectors.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/lsp/testing/collectors.rs b/cli/lsp/testing/collectors.rs index 9781672c6..a66e56948 100644 --- a/cli/lsp/testing/collectors.rs +++ b/cli/lsp/testing/collectors.rs @@ -23,7 +23,7 @@ fn visit_arrow( test_module: &mut TestModule, ) { if let Some((maybe_test_context, maybe_step_var)) = - parse_test_context_param(arrow_expr.params.get(0)) + parse_test_context_param(arrow_expr.params.first()) { let mut collector = TestStepCollector::new( maybe_test_context, @@ -44,7 +44,7 @@ fn visit_fn( test_module: &mut TestModule, ) { if let Some((maybe_test_context, maybe_step_var)) = - parse_test_context_param(function.params.get(0).map(|p| &p.pat)) + parse_test_context_param(function.params.first().map(|p| &p.pat)) { let mut collector = TestStepCollector::new( maybe_test_context, @@ -136,7 +136,7 @@ fn visit_call_expr( text_info: &SourceTextInfo, test_module: &mut TestModule, ) { - if let Some(expr) = node.args.get(0).map(|es| es.expr.as_ref()) { + if let Some(expr) = node.args.first().map(|es| es.expr.as_ref()) { match expr { ast::Expr::Object(obj_lit) => { let mut maybe_name = None; |