Skip to content

Commit

Permalink
Resolve iter_overeager_cloned clippy lint
Browse files Browse the repository at this point in the history
    warning: called `cloned().next()` on an `Iterator`. It may be more efficient to call `next().cloned()` instead
       --> src/main.rs:450:30
        |
    450 |         if let Some(first) = set.iter().cloned().next() {
        |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `set.iter().next().cloned()`
        |
        = note: `#[warn(clippy::iter_overeager_cloned)]` on by default
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned
  • Loading branch information
dtolnay committed Jan 19, 2022
1 parent e5b0b4d commit c6f555f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ fn try_main(log: &mut Log) -> Result<()> {

let now = Utc::now();
for set in stars.values_mut() {
if let Some(first) = set.iter().cloned().next() {
if let Some(first) = set.iter().next() {
set.insert(Star {
time: first.time - Duration::seconds(1),
node: Default::default(),
Expand Down

0 comments on commit c6f555f

Please sign in to comment.