Skip to content

Commit 218697f

Browse files
clippy: disable warning for repeat_n
with recent rustc version we can use `repeat_n` instead of `repeat().take()` ``` error: this `repeat().take()` can be written more concisely --> lightning-invoice/src/ser.rs:256:12 | 256 | Box::new(core::iter::repeat(Fe32::Q).take(to_pad).chain(fes)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `core::iter::repeat_n(Fe32::Q, to_pad)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n = note: `-D clippy::manual-repeat-n` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::manual_repeat_n)]` ``` but to keep compatibility with older rustc versions we need to disable the warning for the `repeat_n` lint. Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent c4d23bc commit 218697f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ci/check-lint.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,5 @@ RUSTFLAGS='-D warnings' cargo clippy -- \
9494
-A clippy::unnecessary_unwrap \
9595
-A clippy::unused_unit \
9696
-A clippy::useless_conversion \
97-
-A clippy::unnecessary_map_or `# to be removed once we hit MSRV 1.70`
97+
-A clippy::unnecessary_map_or `# to be removed once we hit MSRV 1.70` \
98+
-A clippy::iter_repeat_n `# to be removed once we hit MSRV 1.86`

0 commit comments

Comments
 (0)