diff options
author | Chris Wendt <chrismwendt@gmail.com> | 2022-06-08 03:27:33 -0600 |
---|---|---|
committer | Chris Wendt <chrismwendt@gmail.com> | 2022-06-08 03:27:33 -0600 |
commit | e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4 (patch) | |
tree | e103d0d81145c087011846af75aac7d328b917c1 /stm_test.go | |
parent | AtomicSet generic value (diff) | |
download | stm-e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4.tar.gz stm-e6ac933d42b3b4a8ffd891b205ba48f0c1e278a4.tar.xz |
replace "interface{}" with "any"
Diffstat (limited to 'stm_test.go')
-rw-r--r-- | stm_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stm_test.go b/stm_test.go index 8726d40..5ed1b70 100644 --- a/stm_test.go +++ b/stm_test.go @@ -170,7 +170,7 @@ func TestCompose(t *testing.T) { func TestPanic(t *testing.T) { // normal panics should escape Atomically assert.PanicsWithValue(t, "foo", func() { - Atomically(func(*Tx) interface{} { + Atomically(func(*Tx) any { panic("foo") }) }) @@ -213,7 +213,7 @@ func testPingPong(t testing.TB, n int, afterHit func(string)) { var wg sync.WaitGroup bat := func(from, to bool, noise string) { defer wg.Done() - for !Atomically(func(tx *Tx) interface{} { + for !Atomically(func(tx *Tx) any { if doneVar.Get(tx) { return true } @@ -246,7 +246,7 @@ func TestPingPong(t *testing.T) { func TestSleepingBeauty(t *testing.T) { require.Panics(t, func() { - Atomically(func(tx *Tx) interface{} { + Atomically(func(tx *Tx) any { tx.Assert(false) return nil }) @@ -262,7 +262,7 @@ func TestSleepingBeauty(t *testing.T) { // i++ // } // }() -// Atomically(func(tx *Tx) interface{} { +// Atomically(func(tx *Tx) any { // debug.PrintStack() // ret := func() { // defer Atomically(nil) |