Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Remove unnecessary TypeOf in splore (#3632)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalman authored Aug 23, 2017
1 parent 1a7e006 commit 1f5ce92
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/noms/splore/noms_splore.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,8 @@ func getMetaChildren(v types.Value) (children []nodeChild) {
l = v.(types.Blob).Len()
}

vKind := types.TypeOf(v).Desc.Kind()
v.WalkRefs(func(r types.Ref) {
if r.TargetType().Desc.Kind() == vKind {
if r.TargetType().Desc.Kind() == v.Kind() {
children = append(children, nodeChild{
Value: info(r, "#"+r.TargetHash().String()),
})
Expand All @@ -276,7 +275,7 @@ func getMetaChildren(v types.Value) (children []nodeChild) {
}

func nodeHasChildren(v types.Value) bool {
switch k := types.TypeOf(v).Desc.Kind(); k {
switch k := v.Kind(); k {
case types.BlobKind, types.BoolKind, types.NumberKind, types.StringKind:
return false
case types.RefKind:
Expand Down

0 comments on commit 1f5ce92

Please sign in to comment.