recessive: 拓扑排序可读性优化

This commit is contained in:
kercylan98 2023-09-22 10:42:59 +08:00
parent ba02fd4acc
commit fb7839d3e6
1 changed files with 0 additions and 1 deletions

View File

@ -14,7 +14,6 @@ type topologicalNode[V any] struct {
// 该函数在存在循环依赖的情况下将会返回 ErrCircularDependencyDetected 错误
func Topological[Index comparable, V any](slice []V, queryIndexHandler func(item V) Index, queryDependsHandler func(item V) []Index) ([]V, error) {
// 1. 创建一个依赖关系图
var nodes = make(map[Index]*topologicalNode[V])
for _, item := range slice {