Skip to content

Commit 622ae69

Browse files
committed
Remove okio.use and redundant length init.
Change-Id: Ibac659c7aff6d8be99f52d012d603f8251bbd23d
1 parent f394e3e commit 622ae69

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/network/src/main/kotlin/com/google/samples/apps/nowinandroid/core/network/demo/DemoNiaNetworkDataSource.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import kotlinx.coroutines.withContext
2929
import kotlinx.serialization.ExperimentalSerializationApi
3030
import kotlinx.serialization.json.Json
3131
import kotlinx.serialization.json.decodeFromStream
32-
import okio.use
3332
import java.io.ByteArrayOutputStream
3433
import java.io.InputStream
3534
import java.nio.charset.StandardCharsets
@@ -85,7 +84,7 @@ class DemoNiaNetworkDataSource @Inject constructor(
8584
) {
8685
val result = ByteArrayOutputStream()
8786
val buffer = ByteArray(1024)
88-
var length = 0
87+
var length: Int
8988
while (true) {
9089
length = inputStream.read(buffer)
9190
if (length == -1) break

0 commit comments

Comments
 (0)