diff options
| author | Harsh Shandilya <msfjarvis@gmail.com> | 2020-08-05 19:02:24 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-05 19:02:24 +0530 |
| commit | 14c44bf584cb7d13ada46b264419efca923ed65c (patch) | |
| tree | b22c8a9a7be7934927ed20fa9b2060c877953082 /app/src/main/java/com/zeapo/pwdstore/utils/Result.kt | |
| parent | 12a83e5c36b82e42dda6a58248e2879fde9c3ac8 (diff) | |
| download | HardenedPass-14c44bf584cb7d13ada46b264419efca923ed65c.tar.gz HardenedPass-14c44bf584cb7d13ada46b264419efca923ed65c.zip | |
Remove GitAsyncTask and replace with non-blocking coroutines (#865)
Co-authored-by: Fabian Henneke <fabian@henneke.me>
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/utils/Result.kt')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/Result.kt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/Result.kt b/app/src/main/java/com/zeapo/pwdstore/utils/Result.kt new file mode 100644 index 00000000..d152cba6 --- /dev/null +++ b/app/src/main/java/com/zeapo/pwdstore/utils/Result.kt @@ -0,0 +1,16 @@ +/* + * Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ + +package com.zeapo.pwdstore.utils + +/** + * Emulates the Rust Result enum but without returning a value in the [Ok] case. + * https://doc.rust-lang.org/std/result/enum.Result.html + */ +sealed class Result { + + object Ok : Result() + data class Err(val err: Exception) : Result() +} |
