From 003075c5e4933295bdb11d615eb3e323114b75cd Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Mon, 9 Mar 2026 23:02:50 +0100 Subject: [PATCH] [style](trx-frontend-http): use div_ceil() per clippy suggestion Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Stan Grams --- src/trx-client/trx-frontend/trx-frontend-http/src/api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs b/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs index d9a149e..212bf4e 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs +++ b/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs @@ -33,7 +33,7 @@ const REQUEST_TIMEOUT: Duration = Duration::from_secs(15); /// Base64-encode `data` using the standard alphabet (no line wrapping). fn base64_encode(data: &[u8]) -> String { const T: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - let mut out = Vec::with_capacity((data.len() + 2) / 3 * 4); + let mut out = Vec::with_capacity(data.len().div_ceil(3) * 4); for chunk in data.chunks(3) { let b0 = chunk[0] as u32; let b1 = chunk.get(1).copied().unwrap_or(0) as u32;