mirror of
https://github.com/RGBCube/alejandra
synced 2025-08-01 13:07:47 +00:00
refactor: solve clippy warnings
This commit is contained in:
parent
4bcf3acef5
commit
7fdfb603fd
3 changed files with 4 additions and 7 deletions
|
@ -41,7 +41,7 @@ impl Children {
|
||||||
crate::builder::make_isolated_token(
|
crate::builder::make_isolated_token(
|
||||||
rnix::SyntaxKind::TOKEN_COMMENT,
|
rnix::SyntaxKind::TOKEN_COMMENT,
|
||||||
&dedent_comment(
|
&dedent_comment(
|
||||||
&pos.as_ref().unwrap(),
|
pos.as_ref().unwrap(),
|
||||||
token.text(),
|
token.text(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,6 +23,6 @@ pub(crate) fn default(
|
||||||
node: &rnix::SyntaxNode,
|
node: &rnix::SyntaxNode,
|
||||||
) -> std::collections::LinkedList<crate::builder::Step> {
|
) -> std::collections::LinkedList<crate::builder::Step> {
|
||||||
node.children_with_tokens()
|
node.children_with_tokens()
|
||||||
.map(|child| crate::builder::Step::Format(child.into()))
|
.map(|child| crate::builder::Step::Format(child))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,8 @@ pub(crate) fn rule(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let elements: Vec<rnix::SyntaxElement> = children
|
let elements: Vec<rnix::SyntaxElement> =
|
||||||
.get_remaining()
|
children.get_remaining().iter().cloned().collect();
|
||||||
.iter()
|
|
||||||
.map(|child| child.clone())
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
let mut interpolations = elements
|
let mut interpolations = elements
|
||||||
.iter()
|
.iter()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue