reth icon indicating copy to clipboard operation
reth copied to clipboard

Remove unsafe from impl Compact for ClientVersion

Open Dhanraj30 opened this issue 1 year ago • 0 comments

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().

Dhanraj30 avatar Sep 28 '24 08:09 Dhanraj30