Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions crates/oxc_formatter/src/ir_transform/sort_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ impl PartitionedChunk {
elements: &[FormatElement],
) -> (Vec<SortableImport>, Vec<SourceLine>) {
let Self::Imports(lines) = self else {
unreachable!("`into_import_units()` must be called on `PartitionedChunk::Imports` only.");
unreachable!(
"`into_import_units()` must be called on `PartitionedChunk::Imports` only."
);
};

let mut units = vec![];
Expand All @@ -393,7 +395,9 @@ impl PartitionedChunk {
current_leading_lines.push(line);
}
SourceLine::Others(..) => {
unreachable!("`PartitionedChunk::Imports` must not contain `SourceLine::Others`.");
unreachable!(
"`PartitionedChunk::Imports` must not contain `SourceLine::Others`."
);
}
}
}
Expand Down
Loading
Loading