What changed, and why it matters
This commit only reformats Rust source code. It moves a comment onto its own line and adjusts blank lines. No program logic, calculations, or security behavior changed.
No security action needed; this is a code-style cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in rust/apps/tron/src/transaction/wrapped_tron.rs is purely cosmetic: the comment ‘// Account for float precision’ was moved from the end of the while condition to a separate line above it, and whitespace around blank lines was normalized. The executable code and its semantics remain identical.
Changed components
rust/apps/tron/src/transaction/wrapped_tron.rsInspect captured patch +4 / −3
diff --git a/rust/apps/tron/src/transaction/wrapped_tron.rs b/rust/apps/tron/src/transaction/wrapped_tron.rs
index d8764f2..c8c5919 100644
--- a/rust/apps/tron/src/transaction/wrapped_tron.rs
+++ b/rust/apps/tron/src/transaction/wrapped_tron.rs
@@ -464,20 +464,21 @@ impl WrappedTron {
let raw_val = f64::from_str(self.value.as_str())?;
let amount = raw_val / self.divider;
let unit = self.format_unit()?;
-
+
// Calculate precision from divider (power of 10)
let precision = if self.divider <= 1.0 {
0
} else {
let mut count = 0;
let mut d = self.divider;
- while d >= 9.99999 { // Account for float precision
+ while d >= 9.99999 {
+ // Account for float precision
d /= 10.0;
count += 1;
}
count
};
-
+
let formatted = format!("{:.*}", precision, amount);
let trimmed = if formatted.contains('.') {
formatted
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.