Remove use of size_t in Rust code
Needed to upgrade bindgen from 0.59.0 to 0.63.0. Resolves the
following errors:
//#[path = "../../../src/options.rs"]
//mod options;
error[E0432]: unresolved import `keystore2_apc_compat_bindgen::size_t`
--> system/security/keystore2/apc_compat/apc_compat.rs:22:82
|
22 | abortUserConfirmation, closeUserConfirmationService, promptUserConfirmation, size_t,
|
^^^^^^ no `size_t` in the root
error[E0412]: cannot find type `size_t` in this scope
--> system/security/keystore2/apc_compat/apc_compat.rs:79:23
|
79 | tbs_message_size: size_t,
| ^^^^^^ not found in this scope
error[E0412]: cannot find type `size_t` in this scope
--> system/security/keystore2/apc_compat/apc_compat.rs:81:30
|
81 | confirmation_token_size: size_t,
| ^^^^^^ not found in this scope
error[E0412]: cannot find type `size_t` in this scope
--> system/security/keystore2/apc_compat/apc_compat.rs:181:37
|
181 | extra_data.len() as size_t,
| ^^^^^^ not found in this scope
Test: Treehugger
Change-Id: I848f481627f3c14caa6252eee6b5dd40d2f58eed
diff --git a/keystore2/apc_compat/apc_compat.rs b/keystore2/apc_compat/apc_compat.rs
index 57f8710..9f44927 100644
--- a/keystore2/apc_compat/apc_compat.rs
+++ b/keystore2/apc_compat/apc_compat.rs
@@ -19,7 +19,7 @@
//! client.
use keystore2_apc_compat_bindgen::{
- abortUserConfirmation, closeUserConfirmationService, promptUserConfirmation, size_t,
+ abortUserConfirmation, closeUserConfirmationService, promptUserConfirmation,
tryGetUserConfirmationService, ApcCompatCallback, ApcCompatServiceHandle,
};
pub use keystore2_apc_compat_bindgen::{
@@ -76,9 +76,9 @@
handle: *mut ::std::os::raw::c_void,
rc: u32,
tbs_message: *const u8,
- tbs_message_size: size_t,
+ tbs_message_size: usize,
confirmation_token: *const u8,
- confirmation_token_size: size_t,
+ confirmation_token_size: usize,
) {
// # Safety:
// The C/C++ implementation must pass to us the handle that was created
@@ -178,7 +178,7 @@
cb,
prompt_text.as_ptr(),
extra_data.as_ptr(),
- extra_data.len() as size_t,
+ extra_data.len() as usize,
locale.as_ptr(),
ui_opts,
)