Rust 1.65 reduces size in memory, and to maintain compatibility with older compilers, let's just assure we don't grow without us knowning.
Showing the changes to git-diff/src (1 of 2 files). Show all
Unified · Split
| @@ -78,10 +78,11 @@ mod tests { · 77 unmodified lines | ||
| 78 | 78 | |
| 79 | 79 | #[test] |
| 80 | 80 | fn size_of_change() { |
| 81 | − assert_eq!( | |
| 82 | − std::mem::size_of::<Change>(), | |
| 83 | − 46, | |
| 84 | − "this type shouldn't grow without us knowing" | |
| 81 | + let actual = std::mem::size_of::<Change>(); | |
| 82 | + assert!( | |
| 83 | + actual <= 46, | |
| 84 | + "{} <= 46: this type shouldn't grow without us knowing", | |
| 85 | + actual | |
| 85 | 86 | ) |
| 86 | 87 | } |
| 87 | 88 | } |