From e01317d88593af7874da13c2043aa53336fb2d73 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 29 Sep 2018 20:48:24 +0000 Subject: Fix failing test with `bench` feature Using the `bench` feature, `cargo test` was failing since one of the benchmarks was running into a debug assertion for attempting to access a line with an index beyond the grid length. Since this issue was caused by the `len` property not being serialized and deserialized, the `#[serde(skip)]` attribute has been changed to `#[serde(default)]`. The ref-test has been edited to include the correct grid length for proper deserialization. This fixes #1604. --- src/grid/storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/grid/storage.rs b/src/grid/storage.rs index a23f0f37..471afdae 100644 --- a/src/grid/storage.rs +++ b/src/grid/storage.rs @@ -32,7 +32,7 @@ pub struct Storage { /// having to truncate the raw `inner` buffer. /// As long as `len` is bigger than `inner`, it is also possible to grow the scrollback buffer /// without any additional insertions. - #[serde(skip)] + #[serde(default)] len: usize, } -- cgit