diff options
author | 2024-02-20 01:48:06 +0100 | |
---|---|---|
committer | 2024-02-20 01:48:06 +0100 | |
commit | 0fe265adb0a97e64b0c83cbb19c7d0179bb60975 (patch) | |
tree | 18950dfb7e36de492e4b92d47f8533e64bd64633 | |
parent | 49b3a714cc718731d3b09e9711bf4ec769a78109 (diff) | |
parent | e576261ceb6f623e1ce8c47f638a76e8df07ec6c (diff) | |
download | iced-0fe265adb0a97e64b0c83cbb19c7d0179bb60975.tar.gz iced-0fe265adb0a97e64b0c83cbb19c7d0179bb60975.tar.bz2 iced-0fe265adb0a97e64b0c83cbb19c7d0179bb60975.zip |
Merge pull request #2270 from iced-rs/traits-for-modifiers
Implement `PartialOrd`, `Ord`, and `Hash` for `keyboard::Modifiers`
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/audit.yml | 22 | ||||
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | core/src/keyboard/modifiers.rs | 2 |
3 files changed, 13 insertions, 12 deletions
diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 57169796..d5c56ac0 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index a69939c7..e836628c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/core/src/keyboard/modifiers.rs b/core/src/keyboard/modifiers.rs index 479fe6fb..e531510f 100644 --- a/core/src/keyboard/modifiers.rs +++ b/core/src/keyboard/modifiers.rs @@ -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; |