From 0760706e58093a2c157ed88dd76cc6d47926d497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 14 Nov 2019 20:12:45 +0100 Subject: [PATCH] nio-olm: Small format fixes. --- nio-olm/nio-olm-rs/src/account.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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,