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-tui | |
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-tui')
-rw-r--r-- | helix-tui/Cargo.toml | 2 | ||||
-rw-r--r-- | helix-tui/src/widgets/mod.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/helix-tui/Cargo.toml b/helix-tui/Cargo.toml index 8a6d5367..5a250bdc 100644 --- a/helix-tui/Cargo.toml +++ b/helix-tui/Cargo.toml @@ -16,7 +16,7 @@ include = ["src/**/*", "README.md"] default = ["crossterm"] [dependencies] -bitflags = "1.3" +bitflags = "2.0" cassowary = "0.3" unicode-segmentation = "1.10" crossterm = { version = "0.26", optional = true } diff --git a/helix-tui/src/widgets/mod.rs b/helix-tui/src/widgets/mod.rs index 8946ef05..3a0dfc5d 100644 --- a/helix-tui/src/widgets/mod.rs +++ b/helix-tui/src/widgets/mod.rs @@ -27,7 +27,7 @@ use helix_view::graphics::Rect; bitflags! { /// Bitflags that can be composed to set the visible borders essentially on the block widget. - #[derive(Default)] + #[derive(Debug, PartialEq, Eq, Clone, Copy, Default)] pub struct Borders: u8 { /// Show the top border const TOP = 0b0000_0001; @@ -38,7 +38,7 @@ bitflags! { /// Show the left border const LEFT = 0b0000_1000; /// Show all borders - const ALL = Self::TOP.bits | Self::RIGHT.bits | Self::BOTTOM.bits | Self::LEFT.bits; + const ALL = Self::TOP.bits() | Self::RIGHT.bits() | Self::BOTTOM.bits() | Self::LEFT.bits(); } } |