From 3c3b93bc115eca1057c93a26c98a646ac0060ab6 Mon Sep 17 00:00:00 2001 From: Collins Muriuki Date: Mon, 29 Jan 2024 01:49:46 +0300 Subject: [PATCH] fix: Fix clippy and rustfmt ci failures --- src/client.rs | 2 +- tests/mpesa-rust/account_balance_test.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/client.rs b/src/client.rs index bcff05ba4..f70ad9241 100644 --- a/src/client.rs +++ b/src/client.rs @@ -226,7 +226,7 @@ impl Mpesa { #[cfg(feature = "account_balance")] #[doc = include_str!("../docs/client/account_balance.md")] - pub fn account_balance<'a>(&'a self) -> AccountBalanceBuilder { + pub fn account_balance(&self) -> AccountBalanceBuilder { AccountBalance::builder(self) } diff --git a/tests/mpesa-rust/account_balance_test.rs b/tests/mpesa-rust/account_balance_test.rs index 8faa37be0..f2233304e 100644 --- a/tests/mpesa-rust/account_balance_test.rs +++ b/tests/mpesa-rust/account_balance_test.rs @@ -65,9 +65,12 @@ async fn account_balance_using_struct_initialization() { queue_time_out_url: "https://testdomain.com/err".try_into().unwrap(), remarks: "None", result_url: "https://testdomain.com/ok".try_into().unwrap(), - security_credential: client.gen_security_credentials().unwrap() + security_credential: client.gen_security_credentials().unwrap(), }; - let response = AccountBalance::from_request(&client, request).send().await.unwrap(); + let response = AccountBalance::from_request(&client, request) + .send() + .await + .unwrap(); assert_eq!(response.originator_conversation_id, "29464-48063588-1"); assert_eq!(response.conversation_id, "AG_20230206_201056794190723278ff"); assert_eq!(