@@ -76,7 +76,7 @@ func TestLiteInvalid(t *testing.T) {
7676 }
7777 }(testname )
7878
79- _ = tbl1 .DeletePersist (zeroPfx )
79+ _ , _ = tbl1 .DeletePersist (zeroPfx )
8080 })
8181
8282 testname = "Contains"
@@ -160,7 +160,7 @@ func TestLiteDeletePersist(t *testing.T) {
160160 // must not panic
161161 tbl := new (Lite )
162162 checkLiteNumNodes (t , tbl , 0 )
163- tbl = tbl .DeletePersist (randomPrefix (prng ))
163+ tbl , _ = tbl .DeletePersist (randomPrefix (prng ))
164164 checkLiteNumNodes (t , tbl , 0 )
165165 })
166166
@@ -172,7 +172,7 @@ func TestLiteDeletePersist(t *testing.T) {
172172
173173 tbl .Insert (mpp ("10.0.0.0/8" ))
174174 checkLiteNumNodes (t , tbl , 1 )
175- tbl = tbl .DeletePersist (mpp ("10.0.0.0/8" ))
175+ tbl , _ = tbl .DeletePersist (mpp ("10.0.0.0/8" ))
176176 checkLiteNumNodes (t , tbl , 0 )
177177 })
178178
@@ -185,7 +185,7 @@ func TestLiteDeletePersist(t *testing.T) {
185185 tbl .Insert (mpp ("192.168.0.1/32" ))
186186 checkLiteNumNodes (t , tbl , 1 )
187187
188- tbl = tbl .DeletePersist (mpp ("192.168.0.1/32" ))
188+ tbl , _ = tbl .DeletePersist (mpp ("192.168.0.1/32" ))
189189 checkLiteNumNodes (t , tbl , 0 )
190190 })
191191
@@ -199,7 +199,7 @@ func TestLiteDeletePersist(t *testing.T) {
199199 tbl .Insert (mpp ("192.180.0.1/32" ))
200200 checkLiteNumNodes (t , tbl , 2 )
201201
202- tbl = tbl .DeletePersist (mpp ("192.180.0.1/32" ))
202+ tbl , _ = tbl .DeletePersist (mpp ("192.180.0.1/32" ))
203203 checkLiteNumNodes (t , tbl , 1 )
204204 })
205205
@@ -215,7 +215,7 @@ func TestLiteDeletePersist(t *testing.T) {
215215
216216 checkLiteNumNodes (t , tbl , 2 )
217217
218- tbl = tbl .DeletePersist (mpp ("192.180.0.1/32" ))
218+ tbl , _ = tbl .DeletePersist (mpp ("192.180.0.1/32" ))
219219 checkLiteNumNodes (t , tbl , 2 )
220220 })
221221
@@ -231,7 +231,7 @@ func TestLiteDeletePersist(t *testing.T) {
231231
232232 checkLiteNumNodes (t , tbl , 2 )
233233
234- tbl = tbl .DeletePersist (mpp ("192.180.0.1/32" ))
234+ tbl , _ = tbl .DeletePersist (mpp ("192.180.0.1/32" ))
235235 checkLiteNumNodes (t , tbl , 2 )
236236 })
237237
@@ -244,7 +244,7 @@ func TestLiteDeletePersist(t *testing.T) {
244244 tbl .Insert (mpp ("192.168.0.1/32" ))
245245 checkLiteNumNodes (t , tbl , 1 )
246246
247- tbl = tbl .DeletePersist (mpp ("200.0.0.0/32" ))
247+ tbl , _ = tbl .DeletePersist (mpp ("200.0.0.0/32" ))
248248 checkLiteNumNodes (t , tbl , 1 )
249249 })
250250
@@ -259,7 +259,7 @@ func TestLiteDeletePersist(t *testing.T) {
259259 tbl .Insert (mpp ("192.168.0.0/22" ))
260260 checkLiteNumNodes (t , tbl , 3 )
261261
262- tbl = tbl .DeletePersist (mpp ("192.168.0.0/22" ))
262+ tbl , _ = tbl .DeletePersist (mpp ("192.168.0.0/22" ))
263263 checkLiteNumNodes (t , tbl , 1 )
264264 })
265265
@@ -270,7 +270,7 @@ func TestLiteDeletePersist(t *testing.T) {
270270
271271 tbl .Insert (mpp ("0.0.0.0/0" ))
272272 tbl .Insert (mpp ("::/0" ))
273- tbl = tbl .DeletePersist (mpp ("0.0.0.0/0" ))
273+ tbl , _ = tbl .DeletePersist (mpp ("0.0.0.0/0" ))
274274
275275 checkLiteNumNodes (t , tbl , 1 )
276276 })
@@ -284,10 +284,10 @@ func TestLiteDeletePersist(t *testing.T) {
284284 tbl .Insert (mpp ("10.20.0.0/17" ))
285285 checkLiteNumNodes (t , tbl , 2 )
286286
287- tbl = tbl .DeletePersist (mpp ("10.20.0.0/17" ))
287+ tbl , _ = tbl .DeletePersist (mpp ("10.20.0.0/17" ))
288288 checkLiteNumNodes (t , tbl , 1 )
289289
290- tbl = tbl .DeletePersist (mpp ("10.10.0.0/17" ))
290+ tbl , _ = tbl .DeletePersist (mpp ("10.10.0.0/17" ))
291291 checkLiteNumNodes (t , tbl , 0 )
292292 })
293293}
@@ -837,7 +837,8 @@ func TestLiteWalkPersist(t *testing.T) {
837837 "fd00::/8" ,
838838 },
839839 fn : func (pl * Lite , pfx netip.Prefix ) (* Lite , bool ) {
840- return pl .DeletePersist (pfx ), true // remove everything
840+ prt , _ := pl .DeletePersist (pfx )
841+ return prt , true // remove everything
841842 },
842843 wantRemain : []string {},
843844 },
@@ -849,7 +850,7 @@ func TestLiteWalkPersist(t *testing.T) {
849850 },
850851 fn : func (pl * Lite , pfx netip.Prefix ) (* Lite , bool ) {
851852 if pfx .Addr ().Is4 () {
852- pl = pl .DeletePersist (pfx )
853+ pl , _ = pl .DeletePersist (pfx )
853854 }
854855 return pl , true
855856 },
0 commit comments