reth
reth copied to clipboard
Remove unsafe from impl Compact for ClientVersion
This PR refactors the Compact implementation for the ClientVersion struct by removing unsafe calls to String::from_utf8_unchecked. Instead, it utilizes safe conversion methods, enhancing code safety and maintainability.
#11294
Key Changes: Implemented the Compact trait for String for safe byte-to-string conversion. Updated from_compact in ClientVersion to use String::from_utf8().unwrap().