diff options
| author | evie <50974538+mi2ebi@users.noreply.github.com> | 2025-03-11 03:00:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-11 10:00:53 +0000 |
| commit | 3650859ae8823f47c9f50db6ad5ed52a0477bf15 (patch) | |
| tree | ccb21d73c0263019744ea5e8276fbda91ee4f7f5 /crates/typst-library/src/visualize/gradient.rs | |
| parent | bd531e08dc3dbe26ac779d5730bf0814800b7de9 (diff) | |
Fix `cargo clippy` warnings (mostly about `.repeat.take` and `.next_back`) (#6038)
Diffstat (limited to 'crates/typst-library/src/visualize/gradient.rs')
| -rw-r--r-- | crates/typst-library/src/visualize/gradient.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/typst-library/src/visualize/gradient.rs b/crates/typst-library/src/visualize/gradient.rs index 1a723a9f..d59175a4 100644 --- a/crates/typst-library/src/visualize/gradient.rs +++ b/crates/typst-library/src/visualize/gradient.rs @@ -574,8 +574,7 @@ impl Gradient { } let n = repetitions.v; - let mut stops = std::iter::repeat(self.stops_ref()) - .take(n) + let mut stops = std::iter::repeat_n(self.stops_ref(), n) .enumerate() .flat_map(|(i, stops)| { let mut stops = stops |
