refactor: switch StringBuilder capacity to size_hint
check / check (macos-latest) (push) Failing after 2m16s
check / check (ubuntu-latest) (push) Failing after 2m14s
check / check (windows-latest) (push) Failing after 14m21s

- Replace the StringBuilder(capacity=...) argument with size_hint=... in base32, base64, hex, SAM quoting/parsing.
- Drop trailing commas after the last field in I2NP, NTCP2 and tunnel fragment enum variants (formatter cleanup).
- No behavior change; encoded output and parsed fields are unchanged.
This commit is contained in:
nandi committed 2026-11-27 16:57:28 -08:00
1 parent cadb8cd898
commit 274bb319ab
7 files changed
+12 -12

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ pub fn base64_encode(data : Bytes) -> String {
if len == 0 {
return ""
}
let buf = StringBuilder(capacity=(len + 2) / 3 * 4)
let buf = StringBuilder(size_hint=(len + 2) / 3 * 4)
let mut i = 0
while i < len {
let b0 = data[i].to_int()