Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

derive Copy for trivial struct #236

Merged
merged 3 commits into from
Oct 13, 2024

Conversation

sineptic
Copy link
Contributor

No description provided.

@asukaminato0721
Copy link
Collaborator

error: using `clone` on type `FSRSReview` which implements the `Copy` trait
  --> src/dataset.rs:50:9
   |
50 | /         self.reviews
51 | |             .iter()
52 | |             .find(|review| review.delta_t > 0)
53 | |             .unwrap()
54 | |             .clone()
   | |____________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
   = note: `-D clippy::clone-on-copy` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`
help: try dereferencing it
   |
50 ~         *self.reviews
51 +             .iter()
52 +             .find(|review| review.delta_t > 0)
53 +             .unwrap()

@asukaminato0721 asukaminato0721 merged commit 9f6b220 into open-spaced-repetition:main Oct 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants