Skip to content

Commit

Permalink
fix: avl.Tree.Iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
anarcher committed Jul 21, 2023
1 parent 715e72f commit d66c615
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/gno.land/r/system/names/public.gno
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package names
import (
"std"

"gno.land/p/demo/avl"
"gno.land/p/demo/ufmt"
)

Expand Down Expand Up @@ -107,9 +106,8 @@ func renderNamespace(namespace string) string {

func renderIndex() string {
output := "## Namespaces \n"
namespaces.Iterate("", "", func(n *avl.Node) bool {
namespace := n.Key()
space := n.Value().(*Space)
namespaces.Iterate("", "", func(namespace string, value interface{}) bool {
space := value.(*Space)
output += ufmt.Sprintf("* [%s](/r/system/names:n/%s) - admins: %d editors: %d inPause: %s \n",
namespace, namespace, len(space.Admins), len(space.Editors), formatBool(space.InPause))
return false
Expand Down

0 comments on commit d66c615

Please sign in to comment.