Commit 7cd387c
committed
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 8dd1b39 commit 7cd387c
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
0 commit comments