-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feat/fuzz #33
Feat/fuzz #33
Conversation
@L-M-Sherlock Would you mind reviewing my recent code changes? |
src/scheduler.rs
Outdated
fn init_seed(parameters: &mut Parameters, current: &Card, now: DateTime<Utc>) { | ||
let time = now.timestamp_millis(); | ||
fn init_seed(parameters: &mut Parameters, current: &Card) { | ||
let time = Utc::now().timestamp_millis(); | ||
let reps = current.reps; | ||
let mul = current.difficulty * current.stability; | ||
parameters.seed = Seed::new(format!("{}_{}_{}", time, reps, mul)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameters.seed = Seed::new(format!("{time}_{reps}_{mul}"));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait. I feel confused. Maybe it's a problem from the source: ts-fsrs.
I am ok with the code, waiting for @L-M-Sherlock 's opinion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But the fuzz seed needs refactoring in the future.
ok |
Description
add fuzz
Related Issue
part of #22
Dependencies change
add rand as [dev-dependencies] for test