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:
parent
4bcf3acef5
commit
7fdfb603fd
3 changed files with 4 additions and 7 deletions
|
@ -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(),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue