From 9b18fe12d9b8cc301ce460eedeb28b6d83ad5794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Rychnovsk=C3=BD?= Date: Tue, 12 Sep 2023 19:36:39 +0200 Subject: [PATCH] Add encode_scan_progress documentation Co-authored-by: Daira Emma Hopwood --- backend-lib/src/main/rust/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend-lib/src/main/rust/lib.rs b/backend-lib/src/main/rust/lib.rs index c632ae1e..d16a23ff 100644 --- a/backend-lib/src/main/rust/lib.rs +++ b/backend-lib/src/main/rust/lib.rs @@ -1147,6 +1147,8 @@ pub unsafe extern "C" fn Java_cash_z_ecc_android_sdk_internal_jni_RustBackend_ge unwrap_exc_or(&env, res, -1) } +/// Returns a `JniScanProgress` object, provided that numerator is nonnegative, denominator +/// is positive, and the represented ratio is in the range 0.0 to 1.0 inclusive. fn encode_scan_progress(env: &JNIEnv<'_>, progress: Ratio) -> Result { let output = env.new_object( "cash/z/ecc/android/sdk/internal/model/JniScanProgress",