Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Sep 30, 2024
1 parent f66b9d4 commit d941a73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generation/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ fn gen_array<'a>(node: SyntaxNode, context: &mut Context<'a>) -> PrintItemsResul
let open_token = get_token_with_kind(&node, SyntaxKind::BRACKET_START)?;
let close_token = get_token_with_kind(&node, SyntaxKind::BRACKET_END)?;
let is_in_inline_table = node.ancestors().any(|a| a.kind() == SyntaxKind::INLINE_TABLE);
let force_use_new_lines = !is_in_inline_table && has_following_newline(open_token.clone()) && node.children_with_tokens().skip(3).next().is_some();
let force_use_new_lines = !is_in_inline_table && has_following_newline(open_token.clone()) && node.children_with_tokens().nth(3).is_some();
ensure_all_kind(values.clone(), SyntaxKind::VALUE)?;

Ok(gen_surrounded_by_tokens(
Expand Down

0 comments on commit d941a73

Please sign in to comment.