dioxus/packages/core/src/dirty_scope.rs

22 lines
389 B
Rust
Raw Normal View History

2022-12-13 02:31:30 +00:00
use std::hash::Hash;
2022-11-23 02:38:27 +00:00
use crate::ScopeId;
2022-12-13 02:31:30 +00:00
#[derive(Debug, Clone, Eq, PartialOrd, Ord)]
2022-11-23 02:38:27 +00:00
pub struct DirtyScope {
pub height: u32,
pub id: ScopeId,
}
2022-12-13 02:31:30 +00:00
impl PartialEq for DirtyScope {
fn eq(&self, other: &Self) -> bool {
self.id == other.id
2022-11-23 02:38:27 +00:00
}
}
2022-12-13 02:31:30 +00:00
impl Hash for DirtyScope {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.id.hash(state);
2022-11-23 02:38:27 +00:00
}
}