mirror of https://github.com/astral-sh/ruff
remove redundant parameters check
I believe parameters itself would be None if there were no next parameter
This commit is contained in:
parent
2da4798def
commit
acc49ac1e7
|
|
@ -1848,7 +1848,7 @@ fn handle_lambda_comment<'a>(
|
||||||
// )
|
// )
|
||||||
// ```
|
// ```
|
||||||
if comment.start() < parameters.start() {
|
if comment.start() < parameters.start() {
|
||||||
return if parameters.iter().next().is_some() && comment.line_position().is_own_line() {
|
return if comment.line_position().is_own_line() {
|
||||||
CommentPlacement::leading(parameters, comment)
|
CommentPlacement::leading(parameters, comment)
|
||||||
} else {
|
} else {
|
||||||
CommentPlacement::dangling(comment.enclosing_node(), comment)
|
CommentPlacement::dangling(comment.enclosing_node(), comment)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue