Skip to content

Commit

Permalink
Add is_default
Browse files Browse the repository at this point in the history
  • Loading branch information
wtholliday committed Jun 16, 2023
1 parent be9a264 commit 9d1847c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/viewid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ impl ViewId {
pub fn access_id(&self) -> accesskit::NodeId {
accesskit::NodeId(std::num::NonZeroU128::new(self.id as u128).unwrap())
}

pub fn is_default(self) -> bool {
self == ViewId::default()
}
}

0 comments on commit 9d1847c

Please sign in to comment.