What changed, and why it matters
This commit is purely a code-formatting cleanup. It reorders an import, breaks a few long assert lines into multiple lines, and removes extra blank lines. There are no functional changes to the firmware or any security-relevant behavior.
No action needed; this is a cosmetic formatting commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff shows only formatting changes across five Rust files in the TON app: import reordering in errors.rs, wrapping long macro/assert expressions in jetton.rs, mod.rs, and nft.rs, removing surplus newlines, and adjusting the import style in rust_c/src/ton/mod.rs. No logic, parsing, cryptographic, or FFI code is altered.
Changed components
Inspect captured patch +12 / −9
diff --git a/rust/apps/ton/src/errors.rs b/rust/apps/ton/src/errors.rs
index c0f498f..5ce3cdc 100644
--- a/rust/apps/ton/src/errors.rs
+++ b/rust/apps/ton/src/errors.rs
@@ -49,9 +49,9 @@ impl From<MnemonicError> for TonError {
mod tests {
extern crate std;
- use alloc::string::ToString;
use super::{MnemonicError, TonError};
use crate::vendor::cell::TonCellError;
+ use alloc::string::ToString;
#[test]
fn test_mnemonic_error_conversion_preserves_context() {
@@ -94,4 +94,3 @@ mod tests {
}
}
}
-
diff --git a/rust/apps/ton/src/messages/jetton.rs b/rust/apps/ton/src/messages/jetton.rs
index 6a27472..f36baa3 100644
--- a/rust/apps/ton/src/messages/jetton.rs
+++ b/rust/apps/ton/src/messages/jetton.rs
@@ -224,7 +224,9 @@ mod tests {
let cell = builder.build()?.to_arc();
let err = JettonMessage::parse(&cell).unwrap_err();
- assert!(matches!(err, TonCellError::InternalError(message) if message.contains("Invalid Op Code")));
+ assert!(
+ matches!(err, TonCellError::InternalError(message) if message.contains("Invalid Op Code"))
+ );
Ok(())
}
diff --git a/rust/apps/ton/src/messages/mod.rs b/rust/apps/ton/src/messages/mod.rs
index e15620f..b55e937 100644
--- a/rust/apps/ton/src/messages/mod.rs
+++ b/rust/apps/ton/src/messages/mod.rs
@@ -268,7 +268,10 @@ mod tests {
#[test]
fn test_infer_action_known_and_unknown() {
- assert_eq!(infer_action(JETTON_TRANSFER).as_deref(), Some("Jetton Transfer"));
+ assert_eq!(
+ infer_action(JETTON_TRANSFER).as_deref(),
+ Some("Jetton Transfer")
+ );
assert_eq!(infer_action(NFT_TRANSFER).as_deref(), Some("NFT Transfer"));
assert_eq!(infer_action(0xDEADBEEF), None);
}
@@ -346,5 +349,3 @@ mod tests {
Ok(())
}
}
-
-
diff --git a/rust/apps/ton/src/messages/nft.rs b/rust/apps/ton/src/messages/nft.rs
index 96bcb1a..b1395fc 100644
--- a/rust/apps/ton/src/messages/nft.rs
+++ b/rust/apps/ton/src/messages/nft.rs
@@ -193,7 +193,9 @@ mod tests {
let cell = builder.build()?.to_arc();
let err = NFTMessage::parse(&cell).unwrap_err();
- assert!(matches!(err, TonCellError::InternalError(message) if message.contains("Invalid Op Code")));
+ assert!(
+ matches!(err, TonCellError::InternalError(message) if message.contains("Invalid Op Code"))
+ );
Ok(())
}
diff --git a/rust/rust_c/src/ton/mod.rs b/rust/rust_c/src/ton/mod.rs
index 92cc6b0..7559cf2 100644
--- a/rust/rust_c/src/ton/mod.rs
+++ b/rust/rust_c/src/ton/mod.rs
@@ -16,7 +16,7 @@ use alloc::{
string::{String, ToString},
vec::Vec,
};
-use app_ton::{ton_compare_address_and_public_key};
+use app_ton::ton_compare_address_and_public_key;
use crate::{extract_ptr_with_type, impl_c_ptr};
use cty::c_char;
@@ -193,7 +193,6 @@ pub unsafe extern "C" fn ton_sign_proof(
}
}
-
#[no_mangle]
pub unsafe extern "C" fn ton_get_address(public_key: PtrString) -> *mut SimpleResponse<c_char> {
let pk = recover_c_char(public_key);
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.