Skip to content

Commit

Permalink
perf: remove try_get_export_info_by_id
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Feb 11, 2025
1 parent 45f4643 commit 9e0436b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/rspack_core/src/module_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1025,13 +1025,9 @@ impl<'a> ModuleGraph<'a> {
active_partial.exports_info_map.insert(id, info);
}

pub fn try_get_export_info_by_id(&self, id: &ExportInfo) -> Option<&ExportInfoData> {
self.loop_partials(|p| p.export_info_map.get(id))
}

pub fn get_export_info_by_id(&self, id: &ExportInfo) -> &ExportInfoData {
self
.try_get_export_info_by_id(id)
.loop_partials(|p| p.export_info_map.get(id))
.expect("should have export info")
}

Expand Down

0 comments on commit 9e0436b

Please sign in to comment.