Merge pull request #2270 from iced-rs/traits-for-modifiers
Implement `PartialOrd`, `Ord`, and `Hash` for `keyboard::Modifiers`
This commit is contained in:
commit
0fe265adb0
3 changed files with 13 additions and 12 deletions
22
.github/workflows/audit.yml
vendored
22
.github/workflows/audit.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue