Often times in code i do something like:
optionalStream()
.subscribe { fooOptional ->
val foo = fooOptional.toNullable()
if (foo != null) ...
else ...
}
with operator fun component1() = toNullable() implemented on Optional I could instead do:
optionalStream()
.subscribe { (foo) ->
if (foo != null) ...
else ...
}
tiny optimization. Happy to contribute this if it makes sense but since its api changing I figured I'd issue first in case it doesnt make sense
Often times in code i do something like:
with
operator fun component1() = toNullable()implemented onOptionalI could instead do:tiny optimization. Happy to contribute this if it makes sense but since its api changing I figured I'd issue first in case it doesnt make sense