What changed, and why it matters
This commit is purely a code formatting change. It uses a newer version of rustfmt to re-wrap long match-arm expressions onto multiple lines in a single file. No logic, behavior, or security properties of the code were changed.
No security action needed. Treat as a normal style-only maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in crypto/src/key.rs only reformats the try_decode closure inside LegacyPublicKey::from_str. The same match arms, error mappings, and control flow remain identical; only line breaks and indentation were adjusted to satisfy an updated rustfmt style. There are no functional modifications.
Changed components
crypto/src/key.rsInspect captured patch +6 / −3
### crypto/src/key.rs
@@ -831,9 +831,12 @@ impl FromStr for LegacyPublicKey {
fn from_str(s: &str) -> Result<Self, ParsePublicKeyError> {
fn try_decode<const N: usize>(s: &str) -> Result<LegacyPublicKey, ParsePublicKeyError> {
match hex::decode_to_array::<N>(s) {
- Ok(bytes) => LegacyPublicKey::from_slice(&bytes).map_err(ParsePublicKeyError::Encoding),
- Err(DecodeFixedLengthBytesError::InvalidChar(e)) => Err(ParsePublicKeyError::InvalidChar(e)),
- Err(DecodeFixedLengthBytesError::InvalidLength(_)) => Err(ParsePublicKeyError::InvalidHexLength(s.len())),
+ Ok(bytes) =>
+ LegacyPublicKey::from_slice(&bytes).map_err(ParsePublicKeyError::Encoding),
+ Err(DecodeFixedLengthBytesError::InvalidChar(e)) =>
+ Err(ParsePublicKeyError::InvalidChar(e)),
+ Err(DecodeFixedLengthBytesError::InvalidLength(_)) =>
+ Err(ParsePublicKeyError::InvalidHexLength(s.len())),
}
}
try_decode::<33>(s).or_else(|e| match e {Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.