1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-31 12:37:45 +00:00

perf: simplify if

- Both branches are equal, so lets remove the unnecesary one
This commit is contained in:
Kevin Amado 2022-02-03 20:32:38 -05:00
parent e0371e76f8
commit 9229240c62
No known key found for this signature in database
GPG key ID: FFF341057F503148

View file

@ -70,19 +70,6 @@ pub fn rule(
{
steps.push_back(crate::builder::Step::NewLine);
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 {
steps.push_back(crate::builder::Step::Whitespace);
}