Skip to content

Commit

Permalink
thanks section, cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
igrmk committed Jul 14, 2020
1 parent 66ee485 commit 669a8d2
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ Copyright © 2018 Igor Mikushkin <igor.mikushkin@gmail.com>.
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENSE file for more details.

### Thanks to

[![JetBrains](svg/jetbrains.svg)](https://www.jetbrains.com/?from=treemap)
1 change: 1 addition & 0 deletions debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func graphvizEdges(node *node) string {
}

// nolint: megacheck
//noinspection GoUnusedFunction
func graphviz(node *node) string {
return "digraph {\nnode [style=filled]\n" + graphvizNodes(node) + graphvizEdges(node) + "}\n"
}
1 change: 1 addition & 0 deletions example/gotemplate_intStringTreeMap.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions example/random_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type TreeMap = intStringTreeMap
const NumIters = 10000
const RandMax = 40

//noinspection GoNilness
func min(kv map[Key]Value) Key {
if len(kv) == 0 {
return 0
Expand All @@ -29,6 +30,7 @@ func min(kv map[Key]Value) Key {
return *key
}

//noinspection GoNilness
func max(kv map[Key]Value) Key {
if len(kv) == 0 {
return 0
Expand Down
3 changes: 2 additions & 1 deletion example/treemap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ func TestClear(t *testing.T) {
}

func testRange(t *testing.T, it, end forwardIteratorIntStringTreeMap, exp []string) {
var got []string
//noinspection GoPreferNilSlice
got := []string{}
for ; it != end; it.Next() {
got = append(got, it.Value())
}
Expand Down
73 changes: 73 additions & 0 deletions svg/jetbrains.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions treemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ func (t *TreeMap) insertFixup(x *node) {
}

// nolint: gocyclo
//noinspection GoNilness
func removeNode(root *node, z *node) {
var y *node
if z.left == nil || z.right == nil {
Expand Down
3 changes: 2 additions & 1 deletion treemap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ func TestClear(t *testing.T) {
}

func testRange(t *testing.T, it, end ForwardIterator, exp []Value) {
var got []Value
//noinspection GoPreferNilSlice
got := []Value{}
for ; it != end; it.Next() {
got = append(got, it.Value())
}
Expand Down

0 comments on commit 669a8d2

Please sign in to comment.