Fix serde tests without default features

This commit is contained in:
James McCoy 2024-01-02 03:05:12 -05:00 committed by Christian Duerr
parent 3a2b959f8d
commit 6e7895b2af
3 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,8 @@ jobs:
- uses: actions/checkout@v3
- name: Stable
run: cargo test
- name: Stable (no default features)
run: cargo test -p alacritty_terminal --no-default-features
- name: Oldstable
run: |
rustup default 1.70.0

View File

@ -2710,6 +2710,7 @@ mod tests {
/// This test is in the term module as opposed to the grid since we want to
/// test this property with a T=Cell.
#[test]
#[cfg(feature = "serde")]
fn grid_serde() {
let grid: Grid<Cell> = Grid::new(24, 80, 0);
let serialized = serde_json::to_string(&grid).expect("ser");

View File

@ -1,3 +1,4 @@
#![cfg(feature = "serde")]
use serde::Deserialize;
use serde_json as json;