Skip to content

Commit

Permalink
exit early
Browse files Browse the repository at this point in the history
  • Loading branch information
maksym-arutyunyan committed Aug 30, 2024
1 parent 431e807 commit e190fca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/strategies/rust_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ fn sort(block: Vec<String>, 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(", ");
Expand Down

0 comments on commit e190fca

Please sign in to comment.