diff --git a/src/strategies/rust_derive.rs b/src/strategies/rust_derive.rs index 653b9fd..581faeb 100644 --- a/src/strategies/rust_derive.rs +++ b/src/strategies/rust_derive.rs @@ -78,7 +78,9 @@ fn sort(block: Vec, is_ignore_block_prev_line: bool, strategy: Strategy) Strategy::RustDeriveCanonical => { traits = canonical_sort(traits); } - _ => (), + _ => { + return block; + } } traits.retain(|t| !t.is_empty()); let sorted_traits = traits.join(", ");