clippy fix

This commit is contained in:
Devyn Cairns 2024-07-12 21:34:26 -07:00
parent 5272bca240
commit a2832199c0
2 changed files with 4 additions and 4 deletions

View File

@ -5659,9 +5659,9 @@ pub(crate) fn redirecting_builtin_error(
}
pub fn parse_pipeline(working_set: &mut StateWorkingSet, pipeline: &LitePipeline) -> Pipeline {
let first_command = pipeline.commands.get(0);
let first_command = pipeline.commands.first();
let first_command_name = first_command
.and_then(|command| command.parts.get(0))
.and_then(|command| command.parts.first())
.map(|span| working_set.get_span_contents(*span));
if pipeline.commands.len() > 1 {
@ -5768,7 +5768,7 @@ pub fn parse_block(
&& block
.pipelines
.iter()
.flat_map(|pipeline| pipeline.elements.get(0))
.flat_map(|pipeline| pipeline.elements.first())
.any(|element| element.has_in_variable(working_set))
{
// Move the block out to prepare it to become a subexpression

View File

@ -114,7 +114,7 @@ impl Expression {
|| block
.pipelines
.iter()
.flat_map(|pipeline| pipeline.elements.get(0))
.flat_map(|pipeline| pipeline.elements.first())
.any(|element| element.has_in_variable(working_set))
}
Expr::Binary(_) => false,