on master help sign in
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>

commit52ced7e85f4ed18f5467f4fc1799ac84e489f292 authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> dateWed 22 Mar 2023, 08:12 (4 years ago) parent05ee673
8 files changed+27−18
Cargo.lock+19−13 helix-core/Cargo.toml+1−1 helix-core/src/syntax.rs+1 helix-tui/Cargo.toml+1−1 helix-tui/src/widgets/mod.rs+2−2 helix-view/Cargo.toml+1−1 helix-view/src/graphics.rs+1 helix-view/src/keyboard.rs+1
Cargo.lock+19−13
@@ -73,6 +73,12 @@ version = "1.3.2"
7373source = "registry+https://github.com/rust-lang/crates.io-index"
7474checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
7575
76+[[package]]
77+name = "bitflags"
78+version = "2.0.2"
79+source = "registry+https://github.com/rust-lang/crates.io-index"
80+checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1"
81+
7682[[package]]
7783name = "bstr"
7884version = "1.3.0"
@@ -210,7 +216,7 @@ version = "0.26.1"
210216source = "registry+https://github.com/rust-lang/crates.io-index"
211217checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13"
212218dependencies = [
213− "bitflags",
219+ "bitflags 1.3.2",
214220 "crossterm_winapi",
215221 "futures-core",
216222 "libc",
@@ -623,7 +629,7 @@ version = "0.10.1"
623629source = "registry+https://github.com/rust-lang/crates.io-index"
624630checksum = "693d4a4ba0531e46fe558459557a5b29fb86c3e4b2666c1c0861d93c7c678331"
625631dependencies = [
626− "bitflags",
632+ "bitflags 1.3.2",
627633 "bstr",
628634 "gix-path",
629635 "libc",
@@ -708,7 +714,7 @@ version = "0.5.5"
708714source = "registry+https://github.com/rust-lang/crates.io-index"
709715checksum = "93e43efd776bc543f46f0fd0ca3d920c37af71a764a16f2aebd89765e9ff2993"
710716dependencies = [
711− "bitflags",
717+ "bitflags 1.3.2",
712718 "bstr",
713719]
714720
@@ -739,7 +745,7 @@ version = "0.15.0"
739745source = "registry+https://github.com/rust-lang/crates.io-index"
740746checksum = "546ee7855d5d8731288f05a63c07ab41b59cb406660a825ed3fe89d7223823df"
741747dependencies = [
742− "bitflags",
748+ "bitflags 1.3.2",
743749 "bstr",
744750 "btoi",
745751 "filetime",
@@ -923,7 +929,7 @@ version = "0.6.2"
923929source = "registry+https://github.com/rust-lang/crates.io-index"
924930checksum = "e8ffa5bf0772f9b01de501c035b6b084cf9b8bb07dec41e3afc6a17336a65f47"
925931dependencies = [
926− "bitflags",
932+ "bitflags 1.3.2",
927933 "dirs",
928934 "gix-path",
929935 "libc",
@@ -1074,7 +1080,7 @@ version = "0.6.0"
10741080dependencies = [
10751081 "ahash 0.8.3",
10761082 "arc-swap",
1077− "bitflags",
1083+ "bitflags 2.0.2",
10781084 "chrono",
10791085 "encoding_rs",
10801086 "etcetera",
@@ -1198,7 +1204,7 @@ dependencies = [
11981204name = "helix-tui"
11991205version = "0.6.0"
12001206dependencies = [
1201− "bitflags",
1207+ "bitflags 2.0.2",
12021208 "cassowary",
12031209 "crossterm",
12041210 "helix-core",
@@ -1230,7 +1236,7 @@ version = "0.6.0"
12301236dependencies = [
12311237 "anyhow",
12321238 "arc-swap",
1233− "bitflags",
1239+ "bitflags 2.0.2",
12341240 "chardetng",
12351241 "clipboard-win",
12361242 "crossterm",
@@ -1462,7 +1468,7 @@ version = "0.94.0"
14621468source = "registry+https://github.com/rust-lang/crates.io-index"
14631469checksum = "0b63735a13a1f9cd4f4835223d828ed9c2e35c8c5e61837774399f558b6a1237"
14641470dependencies = [
1465− "bitflags",
1471+ "bitflags 1.3.2",
14661472 "serde",
14671473 "serde_json",
14681474 "serde_repr",
@@ -1517,7 +1523,7 @@ version = "0.26.1"
15171523source = "registry+https://github.com/rust-lang/crates.io-index"
15181524checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694"
15191525dependencies = [
1520− "bitflags",
1526+ "bitflags 1.3.2",
15211527 "cfg-if",
15221528 "libc",
15231529 "static_assertions",
@@ -1648,7 +1654,7 @@ version = "0.9.2"
16481654source = "registry+https://github.com/rust-lang/crates.io-index"
16491655checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63"
16501656dependencies = [
1651− "bitflags",
1657+ "bitflags 1.3.2",
16521658 "memchr",
16531659 "unicase",
16541660]
@@ -1695,7 +1701,7 @@ version = "0.2.16"
16951701source = "registry+https://github.com/rust-lang/crates.io-index"
16961702checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
16971703dependencies = [
1698− "bitflags",
1704+ "bitflags 1.3.2",
16991705]
17001706
17011707[[package]]
@@ -1748,7 +1754,7 @@ version = "0.36.7"
17481754source = "registry+https://github.com/rust-lang/crates.io-index"
17491755checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03"
17501756dependencies = [
1751− "bitflags",
1757+ "bitflags 1.3.2",
17521758 "errno",
17531759 "io-lifetimes",
17541760 "libc",
helix-core/Cargo.toml+1−1
@@ -29,7 +29,7 @@ tree-sitter = "0.20"
2929once_cell = "1.17"
3030arc-swap = "1"
3131regex = "1"
32−bitflags = "1.3"
32+bitflags = "2.0"
3333ahash = "0.8.3"
3434hashbrown = { version = "0.13.2", features = ["raw"] }
3535
helix-core/src/syntax.rs+1
@@ -1157,6 +1157,7 @@ impl Syntax {
11571157bitflags! {
11581158 /// Flags that track the status of a layer
11591159 /// in the `Sytaxn::update` function
1160+ #[derive(Debug)]
11601161 struct LayerUpdateFlags : u32{
11611162 const MODIFIED = 0b001;
11621163 const MOVED = 0b010;
helix-tui/Cargo.toml+1−1
@@ -16,7 +16,7 @@ include = ["src/**/*", "README.md"]
1616default = ["crossterm"]
1717
1818[dependencies]
19−bitflags = "1.3"
19+bitflags = "2.0"
2020cassowary = "0.3"
2121unicode-segmentation = "1.10"
2222crossterm = { version = "0.26", optional = true }
helix-tui/src/widgets/mod.rs+2−2
@@ -27,7 +27,7 @@ use helix_view::graphics::Rect;
2727
2828bitflags! {
2929 /// Bitflags that can be composed to set the visible borders essentially on the block widget.
30− #[derive(Default)]
30+ #[derive(Debug, PartialEq, Eq, Clone, Copy, Default)]
3131 pub struct Borders: u8 {
3232 /// Show the top border
3333 const TOP = 0b0000_0001;
@@ -38,7 +38,7 @@ bitflags! {
3838 /// Show the left border
3939 const LEFT = 0b0000_1000;
4040 /// Show all borders
41− const ALL = Self::TOP.bits | Self::RIGHT.bits | Self::BOTTOM.bits | Self::LEFT.bits;
41+ const ALL = Self::TOP.bits() | Self::RIGHT.bits() | Self::BOTTOM.bits() | Self::LEFT.bits();
4242 }
4343}
4444
helix-view/Cargo.toml+1−1
@@ -14,7 +14,7 @@ default = []
1414term = ["crossterm"]
1515
1616[dependencies]
17−bitflags = "1.3"
17+bitflags = "2.0"
1818anyhow = "1"
1919helix-core = { version = "0.6", path = "../helix-core" }
2020helix-loader = { version = "0.6", path = "../helix-loader" }
helix-view/src/graphics.rs+1
@@ -352,6 +352,7 @@ bitflags! {
352352 ///
353353 /// let m = Modifier::BOLD | Modifier::ITALIC;
354354 /// ```
355+ #[derive(PartialEq, Eq, Debug, Clone, Copy)]
355356 pub struct Modifier: u16 {
356357 const BOLD = 0b0000_0000_0001;
357358 const DIM = 0b0000_0000_0010;
helix-view/src/keyboard.rs+1
@@ -2,6 +2,7 @@ use bitflags::bitflags;
22
33bitflags! {
44 /// Represents key modifiers (shift, control, alt).
5+ #[derive(Debug, PartialOrd, Ord, PartialEq, Eq, Clone, Copy, Hash)]
56 pub struct KeyModifiers: u8 {
67 const SHIFT = 0b0000_0001;
78 const CONTROL = 0b0000_0010;