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

refactor: solve clippy warnings

This commit is contained in:
Kevin Amado 2022-02-27 18:02:00 -05:00
parent 4bcf3acef5
commit 7fdfb603fd
3 changed files with 4 additions and 7 deletions

View file

@ -41,7 +41,7 @@ impl Children {
crate::builder::make_isolated_token(
rnix::SyntaxKind::TOKEN_COMMENT,
&dedent_comment(
&pos.as_ref().unwrap(),
pos.as_ref().unwrap(),
token.text(),
),
)

View file

@ -23,6 +23,6 @@ pub(crate) fn default(
node: &rnix::SyntaxNode,
) -> std::collections::LinkedList<crate::builder::Step> {
node.children_with_tokens()
.map(|child| crate::builder::Step::Format(child.into()))
.map(|child| crate::builder::Step::Format(child))
.collect()
}

View file

@ -26,11 +26,8 @@ pub(crate) fn rule(
}
}
} else {
let elements: Vec<rnix::SyntaxElement> = children
.get_remaining()
.iter()
.map(|child| child.clone())
.collect();
let elements: Vec<rnix::SyntaxElement> =
children.get_remaining().iter().cloned().collect();
let mut interpolations = elements
.iter()