1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-29 19:47:45 +00:00

refac: clippy warns

This commit is contained in:
Kevin Amado 2024-11-03 20:12:35 -07:00
parent 2bb91e309c
commit a1b3745de9
3 changed files with 6 additions and 6 deletions

View file

@ -76,8 +76,8 @@ impl Children {
}
}
if pos.is_some() {
pos.as_mut().unwrap().update(&node.text().to_string());
if let Some(ref mut pos) = pos {
pos.update(&node.text().to_string());
}
}
@ -105,8 +105,8 @@ impl Children {
}
}
if pos.is_some() {
pos.as_mut().unwrap().update(token.text());
if let Some(ref mut pos) = pos {
pos.update(token.text());
}
}
}

View file

@ -43,7 +43,7 @@ pub(crate) fn rule(
}
}
for (index, child) in children.into_iter().enumerate() {
for (index, child) in children.enumerate() {
let not_last_child = index + 1 < children_count;
if vertical {

View file

@ -45,7 +45,7 @@ fn to_full_path(entry: walkdir::DirEntry) -> String {
}
fn len_of(path: &str) -> u64 {
match std::fs::metadata(&path) {
match std::fs::metadata(path) {
Ok(meta) => meta.len(),
Err(err) => {
eprintln!("Could not get the size of file at: {path}");