mirror of
https://github.com/swc-project/swc.git
synced 2024-11-22 06:46:41 +03:00
chore: Fix graph creation of cargo bump
This commit is contained in:
parent
14cfd70ee0
commit
5581148d60
@ -281,10 +281,11 @@ struct InternedGraph {
|
|||||||
|
|
||||||
impl InternedGraph {
|
impl InternedGraph {
|
||||||
fn add_node(&mut self, name: String) -> usize {
|
fn add_node(&mut self, name: String) -> usize {
|
||||||
let id = self.ix.len();
|
self.ix.get_index_of(&name).unwrap_or_else(|| {
|
||||||
self.ix.insert(name);
|
let ix = self.ix.len();
|
||||||
self.g.add_node(id);
|
self.ix.insert_full(name);
|
||||||
id
|
ix
|
||||||
|
}) as _
|
||||||
}
|
}
|
||||||
|
|
||||||
fn node(&self, name: &str) -> usize {
|
fn node(&self, name: &str) -> usize {
|
||||||
@ -300,6 +301,7 @@ fn get_data() -> Result<(VersionMap, InternedGraph)> {
|
|||||||
let workspace_packages = md
|
let workspace_packages = md
|
||||||
.workspace_packages()
|
.workspace_packages()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
.filter(|p| p.publish != Some(vec![]))
|
||||||
.map(|p| p.name.clone())
|
.map(|p| p.name.clone())
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let mut graph = InternedGraph::default();
|
let mut graph = InternedGraph::default();
|
||||||
|
Loading…
Reference in New Issue
Block a user