Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyxdd committed Jul 6, 2022
1 parent 5b462b6 commit 8a4f21e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
1 change: 1 addition & 0 deletions frame_sorter.go
Expand Up @@ -2,6 +2,7 @@ package quic

import (
"errors"

"github.com/lucas-clemente/quic-go/internal/utils/tree"

"github.com/lucas-clemente/quic-go/internal/protocol"
Expand Down
3 changes: 2 additions & 1 deletion frame_sorter_test.go
Expand Up @@ -3,11 +3,12 @@ package quic
import (
"bytes"
"fmt"
"github.com/lucas-clemente/quic-go/internal/utils/tree"
"math"
"math/rand"
"time"

"github.com/lucas-clemente/quic-go/internal/utils/tree"

"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/internal/utils"
. "github.com/onsi/ginkgo"
Expand Down
1 change: 1 addition & 0 deletions internal/utils/streamframe_interval.go
Expand Up @@ -2,6 +2,7 @@ package utils

import (
"fmt"

"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/internal/utils/tree"
)
Expand Down
13 changes: 3 additions & 10 deletions internal/utils/tree/tree.go
Expand Up @@ -50,13 +50,6 @@ func (t *Btree) NotEmpty() bool {
return t.root != nil
}

func (t *Btree) balance() int8 {
if t.root != nil {
return balance(t.root)
}
return 0
}

// Insert inserts a new value into the tree and returns the tree pointer
func (t *Btree) Insert(value Val) *Btree {
added := false
Expand Down Expand Up @@ -170,7 +163,7 @@ func (t *Btree) Head() Val {
if t.root == nil {
return nil
}
var beginning = t.root
beginning := t.root
for beginning.left != nil {
beginning = beginning.left
}
Expand All @@ -190,7 +183,7 @@ func (t *Btree) Tail() Val {
if t.root == nil {
return nil
}
var beginning = t.root
beginning := t.root
for beginning.right != nil {
beginning = beginning.right
}
Expand Down Expand Up @@ -265,7 +258,7 @@ func deleteNode(n *Node, value Val, deleted *bool) *Node {
*deleted = true
}

//re-balance
// re-balance
if n == nil {
return n
}
Expand Down

0 comments on commit 8a4f21e

Please sign in to comment.