Skip to content

Commit

Permalink
Merge pull request #2270 from iced-rs/traits-for-modifiers
Browse files Browse the repository at this point in the history
Implement `PartialOrd`, `Ord`, and `Hash` for `keyboard::Modifiers`
  • Loading branch information
hecrj authored Feb 20, 2024
2 parents 49b3a71 + e576261 commit 0fe265a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
- name: Audit vulnerabilities
run: cargo audit

artifacts:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
- name: Install cargo-outdated
run: cargo install cargo-outdated
- uses: actions/checkout@master
- name: Delete `web-sys` dependency from `integration` example
run: sed -i '$d' examples/integration/Cargo.toml
- name: Find outdated dependencies
run: cargo outdated --workspace --exit-code 1 --ignore raw-window-handle
# artifacts:
# runs-on: ubuntu-latest
# steps:
# - uses: hecrj/setup-rust-action@v1
# - name: Install cargo-outdated
# run: cargo install cargo-outdated
# - uses: actions/checkout@master
# - name: Delete `web-sys` dependency from `integration` example
# run: sed -i '$d' examples/integration/Cargo.toml
# - name: Find outdated dependencies
# run: cargo outdated --workspace --exit-code 1 --ignore raw-window-handle
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- `extend` and `from_vec` methods for `Column` and `Row`. [#2264](https://github.com/iced-rs/iced/pull/2264)
- `PartialOrd`, `Ord`, and `Hash` implementations for `keyboard::Modifiers`. [#2270](https://github.com/iced-rs/iced/pull/2270)

### Fixed
- Black images when using OpenGL backend in `iced_wgpu`. [#2259](https://github.com/iced-rs/iced/pull/2259)
Expand Down
2 changes: 1 addition & 1 deletion core/src/keyboard/modifiers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use bitflags::bitflags;

bitflags! {
/// The current state of the keyboard modifiers.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Modifiers: u32{
/// The "shift" key.
const SHIFT = 0b100;
Expand Down

0 comments on commit 0fe265a

Please sign in to comment.