File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
crates/solana-address-book/src Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,16 @@ pub fn seed_to_string(seed: &dyn SeedPart) -> String {
4949 let bytes = seed. as_ref ( ) ;
5050
5151 // Check if it's likely a string (all printable ASCII)
52- if bytes. iter ( ) . all ( |& b| b. is_ascii_graphic ( ) || b == b' ' ) {
53- if let Ok ( s) = std:: str:: from_utf8 ( bytes) {
52+ if bytes. iter ( ) . all ( |& b| b. is_ascii_graphic ( ) || b == b' ' )
53+ && let Ok ( s) = std:: str:: from_utf8 ( bytes) {
5454 return s. to_string ( ) ;
5555 }
56- }
5756
5857 // Check if it's a pubkey (32 bytes)
59- if bytes. len ( ) == 32 {
60- if let Ok ( pubkey) = Pubkey :: try_from ( bytes) {
58+ if bytes. len ( ) == 32
59+ && let Ok ( pubkey) = Pubkey :: try_from ( bytes) {
6160 return pubkey. to_string ( ) ;
6261 }
63- }
6462
6563 // Default to hex encoding for other byte arrays
6664 hex:: encode ( bytes)
You can’t perform that action at this time.
0 commit comments