Skip to content

Commit 6cc9312

Browse files
committed
Fix ignored return value warnings by explicitly ignoring where possible
1 parent c754ba6 commit 6cc9312

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

kotlin-result-coroutines/src/commonTest/kotlin/com/github/michaelbull/result/coroutines/AsyncCoroutineBindingTest.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,23 @@ class AsyncCoroutineBindingTest {
142142
val dispatcherC = StandardTestDispatcher(testScheduler)
143143

144144
val result: Result<Unit, BindingError> = coroutineBinding {
145-
launch(dispatcherA) { provideX().bind() }
145+
launch(dispatcherA) {
146+
val _ = provideX().bind()
147+
}
146148

147149
testScheduler.advanceTimeBy(20.milliseconds)
148150
testScheduler.runCurrent()
149151

150-
launch(dispatcherB) { provideY().bind() }
152+
launch(dispatcherB) {
153+
val _ = provideY().bind()
154+
}
151155

152156
testScheduler.advanceTimeBy(20.milliseconds)
153157
testScheduler.runCurrent()
154158

155-
launch(dispatcherC) { provideZ().bind() }
159+
launch(dispatcherC) {
160+
val _ = provideZ().bind()
161+
}
156162
}
157163

158164
assertEquals(

kotlin-result/src/commonTest/kotlin/com/github/michaelbull/result/ResultIteratorTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ResultIteratorTest {
2828
fun returnsFalseIfYielded() {
2929
val iterator = Ok("hello").iterator()
3030

31-
iterator.next()
31+
val _ = iterator.next()
3232

3333
assertFalse(iterator.hasNext())
3434
}
@@ -57,7 +57,7 @@ class ResultIteratorTest {
5757
fun throwsExceptionIfYieldedAndOk() {
5858
val iterator = Ok("hello").iterator()
5959

60-
iterator.next()
60+
val _ = iterator.next()
6161

6262
assertFailsWith<NoSuchElementException> {
6363
iterator.next()

0 commit comments

Comments
 (0)