mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-16 09:15:02 +01:00
edition 2024 format
This commit is contained in:
parent
b7019e1e43
commit
45a5fda1a3
12 changed files with 42 additions and 38 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use quote::ToTokens;
|
||||
use syn::{parse_quote, visit_mut::VisitMut};
|
||||
|
||||
use crate::processor::{tracking, Pass, PassController, ProcessState, SourceFile};
|
||||
use crate::processor::{Pass, PassController, ProcessState, SourceFile, tracking};
|
||||
|
||||
struct Visitor<'a> {
|
||||
current_path: Vec<String>,
|
||||
|
|
@ -25,9 +25,11 @@ impl<'a> Visitor<'a> {
|
|||
impl VisitMut for Visitor<'_> {
|
||||
fn visit_block_mut(&mut self, block: &mut syn::Block) {
|
||||
match block.stmts.as_slice() {
|
||||
[syn::Stmt::Expr(syn::Expr::Loop(syn::ExprLoop {
|
||||
body: loop_body, ..
|
||||
}))] if loop_body.stmts.is_empty() => {}
|
||||
[
|
||||
syn::Stmt::Expr(syn::Expr::Loop(syn::ExprLoop {
|
||||
body: loop_body, ..
|
||||
})),
|
||||
] if loop_body.stmts.is_empty() => {}
|
||||
// Empty bodies are empty already, no need to loopify them.
|
||||
[] => {}
|
||||
_ if self.checker.can_process(&self.current_path) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue