summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-09-29 20:48:24 +0000
committerGitHub <noreply@github.com>2018-09-29 20:48:24 +0000
commite01317d88593af7874da13c2043aa53336fb2d73 (patch)
tree67a24a56d34758520d1071cceb06f615292daf35 /src
parent1887722ef5b6ac1c1f0e4e4f62cbb02b609c1d4b (diff)
downloadalacritty-e01317d88593af7874da13c2043aa53336fb2d73.tar.gz
alacritty-e01317d88593af7874da13c2043aa53336fb2d73.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/grid/storage.rs2
1 files changed, 1 insertions, 1 deletions
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<T> {
/// 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,
}