mirror of
https://github.com/RGBCube/alejandra
synced 2025-08-01 04:57:44 +00:00
perf: simplify if
- Both branches are equal, so lets remove the unnecesary one
This commit is contained in:
parent
e0371e76f8
commit
9229240c62
1 changed files with 0 additions and 13 deletions
|
@ -70,19 +70,6 @@ pub fn rule(
|
||||||
{
|
{
|
||||||
steps.push_back(crate::builder::Step::NewLine);
|
steps.push_back(crate::builder::Step::NewLine);
|
||||||
steps.push_back(crate::builder::Step::Pad);
|
steps.push_back(crate::builder::Step::Pad);
|
||||||
} else if child.element.kind() == rnix::SyntaxKind::NODE_LAMBDA
|
|
||||||
&& child
|
|
||||||
.element
|
|
||||||
.clone()
|
|
||||||
.into_node()
|
|
||||||
.unwrap()
|
|
||||||
.children_with_tokens()
|
|
||||||
.next()
|
|
||||||
.unwrap()
|
|
||||||
.kind()
|
|
||||||
== rnix::SyntaxKind::NODE_IDENT
|
|
||||||
{
|
|
||||||
steps.push_back(crate::builder::Step::Whitespace);
|
|
||||||
} else {
|
} else {
|
||||||
steps.push_back(crate::builder::Step::Whitespace);
|
steps.push_back(crate::builder::Step::Whitespace);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue