History

Adapt in-memory size check to Rust 1.65 and below

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.

Sebastian Thiel committed 4 years ago

Commit 1919e8e1 parent 04cfa632 files · +10 −8Browse files

Showing the changes to git-diff/src (1 of 2 files). Show all

Unified · Split

git-diff/src/tree/visit.rs+5−4
@@ -78,10 +78,11 @@ mod tests { · 77 unmodified lines
78 78
79 #[test]79 #[test]
80 fn size_of_change() {80 fn size_of_change() {
81 assert_eq!(81 let actual = std::mem::size_of::<Change>();
82 std::mem::size_of::<Change>(),82 assert!(
83 46,83 actual <= 46,
84 "this type shouldn't grow without us knowing"84 "{} <= 46: this type shouldn't grow without us knowing",
85 actual
85 )86 )
86 }87 }
87}88}