fix some edge cases around multiline attributes

This commit is contained in:
Evan Almloff committed 2023-07-19 16:59:20 -07:00
1 parent f69b84bf34
commit b6ea722d94
7 files changed
+77 -205

No files matched your search

+11 -5
View File
@@ -109,11 +109,17 @@ async fn autoformat_project(check: bool) -> Result<()> {
})
.await;
if res.is_err() {
eprintln!("error formatting file: {}", _path.display());
match res {
Err(err) => {
eprintln!("error formatting file: {}\n{err}", _path.display());
None
}
Ok(Err(err)) => {
eprintln!("error formatting file: {}\n{err}", _path.display());
None
}
Ok(Ok(res)) => Some(res),
}
res
})
.collect::<FuturesUnordered<_>>()
.collect::<Vec<_>>()
@@ -122,7 +128,7 @@ async fn autoformat_project(check: bool) -> Result<()> {
let files_formatted: usize = counts
.into_iter()
.map(|f| match f {
Ok(Ok(res)) => res,
Some(res) => res,
_ => 0,
})
.sum();