1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-12 08:42:29 +08:00

fix: fix lint warning 'ineffassign'

This commit is contained in:
dudaodong
2022-03-22 14:36:35 +08:00
parent dd3b1f3aed
commit 7fd9a94922
6 changed files with 22 additions and 25 deletions

View File

@@ -44,14 +44,11 @@ func TestDoublyLink_InsertAt(t *testing.T) {
err := link.InsertAt(1, 1)
assert.IsNotNil(err)
err = link.InsertAt(0, 1)
err = link.InsertAt(1, 2)
err = link.InsertAt(2, 4)
err = link.InsertAt(2, 3)
link.InsertAt(0, 1)
link.InsertAt(1, 2)
link.InsertAt(2, 4)
link.InsertAt(2, 3)
if err != nil {
t.FailNow()
}
link.Print()
expected := []int{1, 2, 3, 4}

View File

@@ -44,10 +44,10 @@ func TestSinglyLink_InsertAt(t *testing.T) {
err := link.InsertAt(1, 1)
assert.IsNotNil(err)
err = link.InsertAt(0, 1)
err = link.InsertAt(1, 2)
err = link.InsertAt(2, 4)
err = link.InsertAt(2, 3)
link.InsertAt(0, 1)
link.InsertAt(1, 2)
link.InsertAt(2, 4)
link.InsertAt(2, 3)
if err != nil {
t.FailNow()