Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
reese authored Jan 7, 2024
1 parent 1f79e4a commit b24283b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions librubyfmt/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3417,13 +3417,13 @@ fn format_aryptn(ps: &mut dyn ConcreteParserState, aryptn: Aryptn) {
Box::new(|ps| {
let mut vals = Vec::new();
if let Some(pre_star_list) = maybe_pre_star_list {
vals.append(&mut pre_star_list.clone());
vals.append(&mut (pre_star_list.clone()));
}
if let Some(star) = maybe_star {
vals.push(pattern_splat_as_expr(star));
}
if let Some(post_star_list) = maybe_post_star_list {
vals.append(&mut post_star_list.clone());
vals.append(&mut (post_star_list.clone()));
}
format_list_like_thing_items(ps, vals, None, false);
}),
Expand Down
3 changes: 1 addition & 2 deletions librubyfmt/src/ripper_tree_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ impl Expression {
}
Expression::Aryptn(Aryptn(_, _, exprs, star, ..)) => exprs
.as_ref()
.map(|exprs| exprs.first().map(|expr| expr.start_line()).flatten())
.flatten()
.and_then(|exprs| exprs.first().and_then(|expr| expr.start_line()))
.or_else(|| {
Some(
star.as_ref()
Expand Down

0 comments on commit b24283b

Please sign in to comment.