diff options
author | dependabot[bot] | 2023-03-22 00:12:08 +0000 |
---|---|---|
committer | GitHub | 2023-03-22 00:12:08 +0000 |
commit | 52ced7e85f4ed18f5467f4fc1799ac84e489f292 (patch) | |
tree | 4ef9888d1cd9114b6df58e13b228126d67fd4bc5 /helix-view | |
parent | 05ee673197c5f882aec0e894cc45e574bb2e46fe (diff) |
build(deps): bump bitflags from 1.3.2 to 2.0.2 (#6387)
* build(deps): bump bitflags from 1.3.2 to 2.0.2
Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.0.2.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.0.2)
---
updated-dependencies:
- dependency-name: bitflags
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* deps: Resolve bitflags 2.0 breaking changes
Bitflags 2.0 release made some breaking changes requiring some small
changes to the Helix codebase.
Almost all of the necessary changes are to manually `#[derive(..)]`
trait implementations which are no longer automatically derived for
all bitflags. All of these were previously automatically derived:
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy]
I have derived the minimum traits for each bitflag type.
The other change was to the `.bits` field. This is now a `.bits()`
method so the usage of this has been updated in the `Borders` type.
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/Cargo.toml | 2 | ||||
-rw-r--r-- | helix-view/src/graphics.rs | 1 | ||||
-rw-r--r-- | helix-view/src/keyboard.rs | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml index e3f98a8d..4f7b08ed 100644 --- a/helix-view/Cargo.toml +++ b/helix-view/Cargo.toml @@ -14,7 +14,7 @@ default = [] term = ["crossterm"] [dependencies] -bitflags = "1.3" +bitflags = "2.0" anyhow = "1" helix-core = { version = "0.6", path = "../helix-core" } helix-loader = { version = "0.6", path = "../helix-loader" } diff --git a/helix-view/src/graphics.rs b/helix-view/src/graphics.rs index e813fb56..046db86a 100644 --- a/helix-view/src/graphics.rs +++ b/helix-view/src/graphics.rs @@ -352,6 +352,7 @@ bitflags! { /// /// let m = Modifier::BOLD | Modifier::ITALIC; /// ``` + #[derive(PartialEq, Eq, Debug, Clone, Copy)] pub struct Modifier: u16 { const BOLD = 0b0000_0000_0001; const DIM = 0b0000_0000_0010; diff --git a/helix-view/src/keyboard.rs b/helix-view/src/keyboard.rs index 04a9922a..080bce8d 100644 --- a/helix-view/src/keyboard.rs +++ b/helix-view/src/keyboard.rs @@ -2,6 +2,7 @@ use bitflags::bitflags; bitflags! { /// Represents key modifiers (shift, control, alt). + #[derive(Debug, PartialOrd, Ord, PartialEq, Eq, Clone, Copy, Hash)] pub struct KeyModifiers: u8 { const SHIFT = 0b0000_0001; const CONTROL = 0b0000_0010; |