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
7878
7979 #[test]
8080 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
8586 )
8687 }
8788 }