Commit ca2eb4a
authored
the Item of a Windows iterator should be an explicitly sized array : iter.rs
the Windows iterator normally returns an array of type [T], but this results in an error where the compiler can't determine the size of the array at compile time when you try to use the [T] in another function like:
Vec_of_i32.windows(2).all(|x| x.do_something());
doesn't compile because x is of type: [i32] and the compiler doesn't know the size.
x's type should be: [i32;2] and the compiler now knows x's size and the code now compiles correctly1 parent caa8172 commit ca2eb4a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1347 | 1347 | | |
1348 | 1348 | | |
1349 | 1349 | | |
1350 | | - | |
| 1350 | + | |
1351 | 1351 | | |
1352 | 1352 | | |
1353 | | - | |
| 1353 | + | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
| |||
0 commit comments