diff options
Diffstat (limited to 'alacritty_terminal/src/grid/storage.rs')
-rw-r--r-- | alacritty_terminal/src/grid/storage.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/alacritty_terminal/src/grid/storage.rs b/alacritty_terminal/src/grid/storage.rs index 8e270d2d..d5709d14 100644 --- a/alacritty_terminal/src/grid/storage.rs +++ b/alacritty_terminal/src/grid/storage.rs @@ -3,6 +3,7 @@ use std::mem; use std::mem::MaybeUninit; use std::ops::{Index, IndexMut}; +#[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; use super::Row; @@ -27,7 +28,8 @@ const MAX_CACHE_SIZE: usize = 1_000; /// [`slice::rotate_left`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left /// [`Deref`]: std::ops::Deref /// [`zero`]: #structfield.zero -#[derive(Serialize, Deserialize, Clone, Debug)] +#[derive(Clone, Debug)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct Storage<T> { inner: Vec<Row<T>>, |