Change the return type of Verifier::verify from KmmResult<Unit> to KmmResult<Success>.
This prevents pathological behavior for consumers confusing .map and .transform exhibited here; any scope function can be quietly interpreted as returning Unit by discarding the return value. This is not possible for the unique data object Success.
Change the return type of
Verifier::verify
fromKmmResult<Unit>
toKmmResult<Success>
.This prevents pathological behavior for consumers confusing
.map
and.transform
exhibited here; any scope function can be quietly interpreted as returningUnit
by discarding the return value. This is not possible for the unique data objectSuccess
.