Skip to content

Commit 4edf7b2

Browse files
committed
clippy again
1 parent f123601 commit 4edf7b2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

crates/solana-address-book/src/pda_seeds.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)