1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Serde feature: Add serde derives to input related structs (#4100)

We plan to store input data for creating automated tests, hence the need
for more serde derives on input related structs.

---------

Co-authored-by: Georg Weisert <georg.weisert@freshx.de>
This commit is contained in:
Georg Weisert
2024-02-26 13:33:43 +01:00
committed by GitHub
parent 5cf99c6308
commit e8af6f38fc
3 changed files with 10 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ use std::collections::VecDeque;
/// or for smoothed velocity (e.g. mouse pointer speed).
/// All times are in seconds.
#[derive(Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub struct History<T> {
/// In elements, i.e. of `values.len()`.
/// The length is initially zero, but once past `min_len` will not shrink below it.