Move tester to a new iced_tester subcrate

This commit is contained in:
Héctor Ramón Jiménez 2025-08-29 08:39:44 +02:00
parent 9e81c2b9e8
commit 4f7444bddf
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
28 changed files with 392 additions and 355 deletions

33
program/src/message.rs Normal file
View file

@ -0,0 +1,33 @@
//! Traits for the message type of a [`Program`](crate::Program).
/// A trait alias for [`Clone`], but only when the `time-travel`
/// feature is enabled.
#[cfg(feature = "time-travel")]
pub trait MaybeClone: Clone {}
#[cfg(feature = "time-travel")]
impl<T> MaybeClone for T where T: Clone {}
/// A trait alias for [`Clone`], but only when the `time-travel`
/// feature is enabled.
#[cfg(not(feature = "time-travel"))]
pub trait MaybeClone {}
#[cfg(not(feature = "time-travel"))]
impl<T> MaybeClone for T {}
/// A trait alias for [`Debug`](std::fmt::Debug), but only when the
/// `debug` feature is enabled.
#[cfg(feature = "debug")]
pub trait MaybeDebug: std::fmt::Debug {}
#[cfg(feature = "debug")]
impl<T> MaybeDebug for T where T: std::fmt::Debug {}
/// A trait alias for [`Debug`](std::fmt::Debug), but only when the
/// `debug` feature is enabled.
#[cfg(not(feature = "debug"))]
pub trait MaybeDebug {}
#[cfg(not(feature = "debug"))]
impl<T> MaybeDebug for T {}