Skip to content

Commit 0ae12ea

Browse files
committed
fix(cargo): ensure direct relation set for all dependencies in root node
1 parent 06afd28 commit 0ae12ea

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

module/cargo/cargo_lock.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ func analyzeCargoLock(input []byte) (rs []*model.DependencyItem, err error) {
100100
continue
101101
}
102102
r.DependencyRelation = model.DependencyRelationDirect
103+
// the root is the project itself
104+
for j := range r.Dependencies {
105+
r.Dependencies[j].DependencyRelation = model.DependencyRelationDirect
106+
}
103107
rs = append(rs, r)
104108
}
105109
return

0 commit comments

Comments
 (0)