diff --git a/nio-olm/nio-olm-rs/src/account.rs b/nio-olm/nio-olm-rs/src/account.rs index 85bb759c..cc0b0146 100644 --- a/nio-olm/nio-olm-rs/src/account.rs +++ b/nio-olm/nio-olm-rs/src/account.rs @@ -5,15 +5,19 @@ pub struct Account { buffer: Vec, } +pub struct IdentityKeys { + ed25519: String, + curve25519: String, +} + impl Account { #[allow(clippy::new_without_default)] pub fn new() -> Account { - let (acc_ptr, account_data) = unsafe { - let account_size = nio_olm_sys::olm_account_size(); - let account_data: Vec = vec![0; account_size]; - let acc_ptr = nio_olm_sys::olm_account(account_data.as_ptr() as *mut _); - (acc_ptr, account_data) - }; + let account_size = unsafe { nio_olm_sys::olm_account_size() }; + + let account_data: Vec = vec![0; account_size]; + + let acc_ptr = unsafe { nio_olm_sys::olm_account(account_data.as_ptr() as *mut _) }; Account { account: acc_ptr,