feat(output): impl PartialEq for Measure
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
🪞👃🪞 2025-08-23 23:19:49 +03:00
parent 375b959e33
commit d9081087ec
2 changed files with 7 additions and 1 deletions

View file

@ -405,7 +405,6 @@ impl<'t, T: Debug + 't> DslNsMap<'t, T> {
)? ]); )? ]);
}); });
#[macro_export] macro_rules!dsl_exprs((|$state:ident|->$Type:ty$({ #[macro_export] macro_rules!dsl_exprs((|$state:ident|->$Type:ty$({
$($name:literal ($($arg:ident:$ty:ty),* $(,)?) => $body:expr),* $(,)? $($name:literal ($($arg:ident:$ty:ty),* $(,)?) => $body:expr),* $(,)?
})?)=>{ })?)=>{

View file

@ -208,6 +208,13 @@ pub struct Measure<E: Output> {
pub y: Arc<AtomicUsize>, pub y: Arc<AtomicUsize>,
} }
impl<E: Output> PartialEq for Measure<E> {
fn eq (&self, other: &Self) -> bool {
self.x.load(Relaxed) == other.x.load(Relaxed) &&
self.y.load(Relaxed) == other.y.load(Relaxed)
}
}
// TODO: 🡘 🡙 ←🡙→ indicator to expand window when too small // TODO: 🡘 🡙 ←🡙→ indicator to expand window when too small
impl<E: Output> Content<E> for Measure<E> { impl<E: Output> Content<E> for Measure<E> {
fn render (&self, to: &mut E) { fn render (&self, to: &mut E) {