What changed, and why it matters
This commit simply deletes two unit tests that checked deprecated functions still forwarded to their replacements. No production code was changed, so it cannot introduce or fix a security issue on its own.
No security action needed. Treat as routine test maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff removes two test functions in units/src/weight.rs: from_witness_data_size and from_non_witness_data_size. Both tests were marked with #[allow(deprecated)] and only verified that deprecated Weight constructors delegated correctly to Weight::from_wu. No runtime logic, API behavior, or unsafe code was modified.
Changed components
units/src/weight.rsInspect captured patch +0 / −20
diff --git a/units/src/weight.rs b/units/src/weight.rs
index f135ac6d..f5a54067 100644
--- a/units/src/weight.rs
+++ b/units/src/weight.rs
@@ -414,26 +414,6 @@ mod tests {
#[should_panic = "attempt to multiply with overflow"]
fn from_vb_unchecked_panic() { Weight::from_vb_unchecked(u64::MAX); }
- #[test]
- #[allow(deprecated)] // tests the deprecated function
- #[allow(deprecated_in_future)]
- fn from_witness_data_size() {
- let witness_data_size = 1;
- let got = Weight::from_witness_data_size(witness_data_size);
- let want = Weight::from_wu(witness_data_size);
- assert_eq!(got, want);
- }
-
- #[test]
- #[allow(deprecated)] // tests the deprecated function
- #[allow(deprecated_in_future)]
- fn from_non_witness_data_size() {
- let non_witness_data_size = 1;
- let got = Weight::from_non_witness_data_size(non_witness_data_size);
- let want = Weight::from_wu(non_witness_data_size * 4);
- assert_eq!(got, want);
- }
-
#[test]
#[cfg(feature = "alloc")]
fn try_from_string() {
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.