Use let.
This commit is contained in:
parent
b70079a0d5
commit
8441795e0d
1 changed files with 1 additions and 3 deletions
|
|
@ -30,9 +30,7 @@ object RustIdentityResetHandleFactory {
|
||||||
identityResetHandle: org.matrix.rustcomponents.sdk.IdentityResetHandle?
|
identityResetHandle: org.matrix.rustcomponents.sdk.IdentityResetHandle?
|
||||||
): Result<IdentityResetHandle?> {
|
): Result<IdentityResetHandle?> {
|
||||||
return runCatching {
|
return runCatching {
|
||||||
if (identityResetHandle == null) {
|
identityResetHandle?.let {
|
||||||
null
|
|
||||||
} else {
|
|
||||||
when (val authType = identityResetHandle.authType()) {
|
when (val authType = identityResetHandle.authType()) {
|
||||||
is CrossSigningResetAuthType.Oidc -> RustOidcIdentityResetHandle(identityResetHandle, authType.info.approvalUrl)
|
is CrossSigningResetAuthType.Oidc -> RustOidcIdentityResetHandle(identityResetHandle, authType.info.approvalUrl)
|
||||||
// User interactive authentication (user + password)
|
// User interactive authentication (user + password)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue