Skip to content

Commit 24c64fc

Browse files
benbrandtdicej
andauthored
Fix clippy lint for iter::repeat_n (#147)
* Fix clippy lint for iter::repeat_n * make test.yaml `test` job depend on `linux` job The latter builds and caches CPython for the former to use, which is important because we don't currently support building CPython on Windows. Signed-off-by: Joel Dice <joel.dice@fermyon.com> --------- Signed-off-by: Joel Dice <joel.dice@fermyon.com> Co-authored-by: Joel Dice <joel.dice@fermyon.com>
1 parent 539472b commit 24c64fc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969

7070
test:
7171
name: Test
72+
needs: linux
7273
strategy:
7374
fail-fast: false
7475
matrix:

src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl Types for Flags {
2929
match self.repr() {
3030
FlagsRepr::U8 => Box::new(iter::once(Type::U8)),
3131
FlagsRepr::U16 => Box::new(iter::once(Type::U16)),
32-
FlagsRepr::U32(count) => Box::new(iter::repeat(Type::U32).take(count)),
32+
FlagsRepr::U32(count) => Box::new(std::iter::repeat_n(Type::U32, count)),
3333
}
3434
}
3535
}

0 commit comments

Comments
 (0)