Skip to content

Commit

Permalink
api/surface: add missing derives on Rect
Browse files Browse the repository at this point in the history
This should provide a way to compare rects for equality
and use them as a hash key downstream.
  • Loading branch information
kchibisov authored Dec 6, 2022
1 parent 5455402 commit 2a9beca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unreleased

- Fixed wrong amount of rects commited in `Surface::swap_buffers_with_damage` with EGL.
- Added missing `Eq`, `PartialEq`, and `Hash` impls for `surface::Rect`.

# Version 0.30.2

Expand Down
2 changes: 1 addition & 1 deletion glutin/src/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ pub enum RawSurface {
///
/// The origin is in the bottom left of the surface.
#[repr(C)]
#[derive(Debug, Clone, Copy, Default)]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
pub struct Rect {
/// `X` of the origin.
pub x: i32,
Expand Down

0 comments on commit 2a9beca

Please sign in to comment.