Move tester to a new iced_tester subcrate
This commit is contained in:
parent
9e81c2b9e8
commit
4f7444bddf
28 changed files with 392 additions and 355 deletions
33
program/src/message.rs
Normal file
33
program/src/message.rs
Normal 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 {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue