We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acdc21f commit c5bba01Copy full SHA for c5bba01
core/commonMain/src/kotlinx/io/Input.kt
@@ -213,8 +213,9 @@ public abstract class Input : Closeable {
213
* This method can use [fill] if no bytes are available in the cache. Please consider using [readAvailableTo] in
214
* performance-critical code.
215
*/
216
- @Suppress("NOTHING_TO_INLINE")
217
- public inline fun exhausted(): Boolean = !prefetch(1)
+ public fun exhausted(): Boolean {
+ return position == limit && fetchCachedOrFill() == 0
218
+ }
219
220
/**
221
* Checks that [size] bytes are fetched in [Input].
0 commit comments