diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2b986bd5..2fe780f9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ clikt = "com.github.ajalt.clikt:clikt:5.1.0" junit = "junit:junit:4.13.2" assertk = "com.willowtreeapps.assertk:assertk:0.28.1" okio = "com.squareup.okio:okio:3.17.0" -bytesize = "me.saket.bytesize:bytesize:2.1.0" +bytesize = "me.saket.bytesize:bytesize:2.2.0" asm = "org.ow2.asm:asm:9.9.1" diffUtils = "io.github.java-diff-utils:java-diff-utils:4.16" picnic = "com.jakewharton.picnic:picnic:0.7.0" diff --git a/reports/src/main/kotlin/com/jakewharton/diffuse/diff/SizeExtensions.kt b/reports/src/main/kotlin/com/jakewharton/diffuse/diff/SizeExtensions.kt index 36c74402..274fe171 100644 --- a/reports/src/main/kotlin/com/jakewharton/diffuse/diff/SizeExtensions.kt +++ b/reports/src/main/kotlin/com/jakewharton/diffuse/diff/SizeExtensions.kt @@ -6,7 +6,7 @@ import me.saket.bytesize.ByteSize import me.saket.bytesize.DecimalBitSize import me.saket.bytesize.DecimalByteSize -/** TODO: https://github.com/saket/byte-size/pull/21 */ +/** TODO: https://github.com/saket/byte-size/issues/22 */ internal val ByteSize.absoluteValue: ByteSize get() = when (this) { @@ -14,12 +14,3 @@ internal val ByteSize.absoluteValue: ByteSize is BinaryByteSize -> BinaryByteSize(inWholeBytes.absoluteValue) is DecimalByteSize -> DecimalByteSize(inWholeBytes.absoluteValue) } - -/** TODO: https://github.com/saket/byte-size/pull/20 */ -@Suppress("NOTHING_TO_INLINE") -internal inline operator fun ByteSize.unaryMinus(): ByteSize = - when (this) { - is DecimalBitSize -> DecimalBitSize(-inWholeBits) - is BinaryByteSize -> BinaryByteSize(-inWholeBytes) - is DecimalByteSize -> DecimalByteSize(-inWholeBytes) - }