Skip to content

Commit 273030a

Browse files
committed
Remove ChunkableModuleOrBatch::None
1 parent 011615d commit 273030a

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

turbopack/crates/turbopack-core/src/chunk/available_chunk_groups.rs

-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ impl AvailableChunkGroups {
5959
let chunk_groups = batch.chunk_groups.as_ref().unwrap();
6060
is_chunk_group_available(&self.chunk_groups, chunk_groups)
6161
}
62-
ChunkableModuleOrBatch::None(_) => unreachable!(),
6362
}))
6463
}
6564
}
@@ -80,7 +79,6 @@ impl AvailableChunkGroups {
8079
let chunk_groups = batch.chunk_groups.as_ref().unwrap();
8180
is_chunk_group_available(&self.chunk_groups, chunk_groups)
8281
}
83-
ChunkableModuleOrBatch::None(_) => unreachable!(),
8482
})
8583
}
8684
}

turbopack/crates/turbopack-core/src/chunk/chunk_item_batch.rs

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ impl ChunkItemOrBatchWithAsyncModuleInfo {
8787
.to_resolved()
8888
.await?,
8989
)),
90-
ChunkableModuleOrBatch::None(_) => None,
9190
})
9291
}
9392

turbopack/crates/turbopack-core/src/module_graph/module_batch.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ pub enum ModuleOrBatch {
4747
pub enum ChunkableModuleOrBatch {
4848
Module(ResolvedVc<Box<dyn ChunkableModule>>),
4949
Batch(ResolvedVc<ModuleBatch>),
50-
None(usize),
5150
}
5251

5352
impl ChunkableModuleOrBatch {
5453
pub fn from_module_or_batch(module_or_batch: ModuleOrBatch) -> Option<Self> {
5554
match module_or_batch {
5655
ModuleOrBatch::Module(module) => ResolvedVc::try_downcast(module).map(Self::Module),
5756
ModuleOrBatch::Batch(batch) => Some(Self::Batch(batch)),
58-
ModuleOrBatch::None(i) => Some(Self::None(i)),
57+
ModuleOrBatch::None(_) => None,
5958
}
6059
}
6160

@@ -67,7 +66,6 @@ impl ChunkableModuleOrBatch {
6766
ChunkableModuleOrBatch::Batch(batch) => {
6867
IdentStrings::Multiple(batch.ident_strings().await?)
6968
}
70-
ChunkableModuleOrBatch::None(_) => IdentStrings::None,
7169
})
7270
}
7371
}
@@ -77,7 +75,6 @@ impl From<ChunkableModuleOrBatch> for ModuleOrBatch {
7775
match chunkable_module_or_batch {
7876
ChunkableModuleOrBatch::Module(module) => Self::Module(ResolvedVc::upcast(module)),
7977
ChunkableModuleOrBatch::Batch(batch) => Self::Batch(batch),
80-
ChunkableModuleOrBatch::None(i) => Self::None(i),
8178
}
8279
}
8380
}

0 commit comments

Comments
 (0)