ViewID equality (#30)

pull/8675/head
Piotr Kwarciński 2025-06-05 21:46:48 +02:00 committed by GitHub
parent e2b81a2ebe
commit 82dce7a650
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -53,7 +53,15 @@ mod steel_implementations {
} }
impl Custom for crate::graphics::CursorKind {} impl Custom for crate::graphics::CursorKind {}
impl Custom for DocumentId {} impl Custom for DocumentId {}
impl Custom for ViewId {} impl Custom for ViewId {
fn equality_hint(&self, other: &dyn steel::rvals::CustomType) -> bool {
if let Some(other) = as_underlying_type::<ViewId>(other) {
self == other
} else {
false
}
}
}
impl CustomReference for Document {} impl CustomReference for Document {}
impl Custom for Action {} impl Custom for Action {}