Skip to content

Commit 5c82061

Browse files
authored
chore: bump forc to 0.68.0 (#1654)
1 parent 8da5791 commit 5c82061

File tree

4 files changed

+18
-306
lines changed

4 files changed

+18
-306
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
FUEL_CORE_PATCH_BRANCH: ""
2121
FUEL_CORE_PATCH_REVISION: ""
2222
RUST_VERSION: 1.85.0
23-
FORC_VERSION: 0.67.0
23+
FORC_VERSION: 0.68.0
2424
FORC_PATCH_BRANCH: ""
2525
FORC_PATCH_REVISION: ""
2626
NEXTEST_HIDE_PROGRESS_BAR: "true"

e2e/sway/types/contracts/vectors/src/eq_impls.sw

Lines changed: 2 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ library;
22

33
use ::data_structures::{SomeEnum, SomeStruct};
44

5-
impl PartialEq for (u32, u32) {
6-
fn eq(self, other: Self) -> bool {
7-
self.0 == other.0 && self.1 == other.1
8-
}
9-
}
10-
impl Eq for (u32, u32) {}
11-
125
impl PartialEq for SomeEnum<u32> {
136
fn eq(self, other: Self) -> bool {
147
match self {
@@ -22,55 +15,12 @@ impl PartialEq for SomeEnum<u32> {
2215
}
2316
}
2417
}
25-
impl Eq for SomeEnum<u32> {}
26-
27-
impl PartialEq for Vec<u32> {
28-
fn eq(self, other: Self) -> bool {
29-
if self.len() != other.len() {
30-
return false;
31-
}
32-
let mut i = 0;
33-
while i < self.len() {
34-
if self.get(i).unwrap() != other.get(i).unwrap() {
35-
return false;
36-
}
37-
i += 1;
38-
}
39-
true
40-
}
41-
}
42-
impl Eq for Vec<u32> {}
43-
44-
impl PartialEq for (Vec<u32>, Vec<u32>) {
45-
fn eq(self, other: Self) -> bool {
46-
self.0 == other.0 && self.1 == other.1
47-
}
48-
}
49-
impl Eq for (Vec<u32>, Vec<u32>) {}
50-
51-
impl PartialEq for Vec<Vec<u32>> {
52-
fn eq(self, other: Self) -> bool {
53-
if self.len() != other.len() {
54-
return false;
55-
}
56-
let mut i = 0;
57-
while i < self.len() {
58-
if self.get(i).unwrap() != other.get(i).unwrap() {
59-
return false;
60-
}
61-
i += 1;
62-
}
63-
true
64-
}
65-
}
66-
impl Eq for Vec<Vec<u32>> {}
6718

6819
impl PartialEq for SomeStruct<u32> {
6920
fn eq(self, other: Self) -> bool {
7021
self.a == other.a
7122
}
7223
}
73-
impl Eq for SomeStruct<u32> {}
7424

7525
impl PartialEq for [Vec<u32>; 2] {
7626
fn eq(self, other: Self) -> bool {
@@ -84,24 +34,6 @@ impl PartialEq for [Vec<u32>; 2] {
8434
true
8535
}
8636
}
87-
impl Eq for [Vec<u32>; 2] {}
88-
89-
impl PartialEq for Vec<SomeStruct<u32>> {
90-
fn eq(self, other: Self) -> bool {
91-
if self.len() != other.len() {
92-
return false;
93-
}
94-
let mut i = 0;
95-
while i < self.len() {
96-
if self.get(i).unwrap() != other.get(i).unwrap() {
97-
return false;
98-
}
99-
i += 1;
100-
}
101-
true
102-
}
103-
}
104-
impl Eq for Vec<SomeStruct<u32>> {}
10537

10638
impl PartialEq for [u64; 2] {
10739
fn eq(self, other: Self) -> bool {
@@ -115,24 +47,6 @@ impl PartialEq for [u64; 2] {
11547
true
11648
}
11749
}
118-
impl Eq for [u64; 2] {}
119-
120-
impl PartialEq for Vec<[u64; 2]> {
121-
fn eq(self, other: Self) -> bool {
122-
if self.len() != other.len() {
123-
return false;
124-
}
125-
let mut i = 0;
126-
while i < self.len() {
127-
if self.get(i).unwrap() != other.get(i).unwrap() {
128-
return false;
129-
}
130-
i += 1;
131-
}
132-
true
133-
}
134-
}
135-
impl Eq for Vec<[u64; 2]> {}
13650

13751
impl PartialEq for SomeEnum<Vec<u32>> {
13852
fn eq(self, other: Self) -> bool {
@@ -147,65 +61,15 @@ impl PartialEq for SomeEnum<Vec<u32>> {
14761
}
14862
}
14963
}
150-
impl Eq for SomeEnum<Vec<u32>> {}
151-
152-
impl PartialEq for Vec<SomeEnum<u32>> {
153-
fn eq(self, other: Self) -> bool {
154-
if self.len() != other.len() {
155-
return false;
156-
}
157-
158-
let mut i = 0;
159-
while i < self.len() {
160-
if self.get(i).unwrap() != other.get(i).unwrap() {
161-
return false;
162-
}
163-
i += 1;
164-
}
165-
true
166-
}
167-
}
168-
impl Eq for Vec<SomeEnum<u32>> {}
16964

170-
impl PartialEq for Vec<(u32, u32)> {
65+
impl PartialEq for SomeStruct<Vec<u32>> {
17166
fn eq(self, other: Self) -> bool {
172-
if self.len() != other.len() {
173-
return false;
174-
}
175-
176-
let mut i = 0;
177-
while i < self.len() {
178-
if self.get(i).unwrap() != other.get(i).unwrap() {
179-
return false;
180-
}
181-
i += 1;
182-
}
183-
true
67+
self.a == other.a
18468
}
18569
}
186-
impl Eq for Vec<(u32, u32)> {}
18770

18871
impl PartialEq for SomeStruct<Vec<Vec<u32>>> {
18972
fn eq(self, other: Self) -> bool {
19073
self.a == other.a
19174
}
19275
}
193-
impl Eq for SomeStruct<Vec<Vec<u32>>> {}
194-
195-
impl PartialEq for Vec<SomeStruct<Vec<Vec<u32>>>> {
196-
fn eq(self, other: Self) -> bool {
197-
if self.len() != other.len() {
198-
return false;
199-
}
200-
201-
let mut i = 0;
202-
while i < self.len() {
203-
if self.get(i).unwrap() != other.get(i).unwrap() {
204-
return false;
205-
}
206-
i += 1;
207-
}
208-
true
209-
}
210-
}
211-
impl Eq for Vec<SomeStruct<Vec<Vec<u32>>>> {}

e2e/sway/types/contracts/vectors/src/main.sw

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ abi MyContract {
1818
fn vec_in_enum(arg: SomeEnum<Vec<u32>>);
1919
fn tuple_in_vec(arg: Vec<(u32, u32)>);
2020
fn vec_in_tuple(arg: (Vec<u32>, Vec<u32>));
21-
2221
fn vec_in_vec(arg: Vec<Vec<u32>>);
23-
2422
fn vec_in_a_vec_in_a_struct_in_a_vec(arg: Vec<SomeStruct<Vec<Vec<u32>>>>);
2523
}
2624

@@ -36,64 +34,67 @@ impl MyContract for Contract {
3634
expected.push(vec_from([0, 1, 2]));
3735
expected.push(vec_from([0, 1, 2]));
3836

39-
assert(expected == arg);
37+
assert_eq(arg, expected);
4038
}
4139

4240
fn struct_in_vec(arg: Vec<SomeStruct<u32>>) {
4341
let mut expected = Vec::new();
4442
expected.push(SomeStruct { a: 0u32 });
4543
expected.push(SomeStruct { a: 1u32 });
4644

47-
assert(arg == expected);
45+
assert_eq(arg, expected);
4846
}
47+
4948
fn vec_in_struct(arg: SomeStruct<Vec<u32>>) {
5049
let expected = SomeStruct {
5150
a: vec_from([0, 1, 2]),
5251
};
5352

54-
assert(arg.a == expected.a);
53+
assert_eq(arg, expected);
5554
}
55+
5656
fn array_in_vec(arg: Vec<[u64; 2]>) {
5757
let mut expected = Vec::new();
5858
expected.push([0, 1]);
5959
expected.push([0, 1]);
6060

61-
assert(arg == expected);
61+
assert_eq(arg, expected);
6262
}
6363

6464
fn vec_in_array(arg: [Vec<u32>; 2]) {
6565
let expected = [vec_from([0, 1, 2]), vec_from([0, 1, 2])];
6666

67-
assert(expected == arg);
67+
assert_eq(arg, expected);
6868
}
6969

7070
fn vec_in_enum(arg: SomeEnum<Vec<u32>>) {
7171
let vec = vec_from([0, 1, 2]);
7272
let expected = SomeEnum::a(vec);
7373

74-
assert(expected == arg);
74+
assert_eq(arg, expected);
7575
}
7676
fn enum_in_vec(arg: Vec<SomeEnum<u32>>) {
7777
let mut expected = Vec::new();
7878
expected.push(SomeEnum::a(0u32));
7979
expected.push(SomeEnum::a(1u32));
8080

81-
assert(arg == expected);
81+
assert_eq(arg, expected);
8282
}
8383

8484
fn tuple_in_vec(arg: Vec<(u32, u32)>) {
8585
let mut expected = Vec::new();
8686
expected.push((0u32, 0u32));
8787
expected.push((1u32, 1u32));
8888

89-
assert(arg == expected);
89+
assert_eq(arg, expected);
9090
}
9191

9292
fn vec_in_tuple(arg: (Vec<u32>, Vec<u32>)) {
9393
let expected = (vec_from([0, 1, 2]), vec_from([0, 1, 2]));
9494

95-
assert(arg == expected);
95+
assert_eq(arg, expected);
9696
}
97+
9798
fn vec_in_a_vec_in_a_struct_in_a_vec(arg: Vec<SomeStruct<Vec<Vec<u32>>>>) {
9899
let mut expected = Vec::new();
99100

@@ -117,6 +118,6 @@ impl MyContract for Contract {
117118

118119
expected.push(SomeStruct { a: inner_vec_2 });
119120

120-
assert(arg == expected);
121+
assert_eq(arg, expected);
121122
}
122123
}

0 commit comments

Comments
 (0)