Skip to content

Improve testing text #3447

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

Merged
merged 30 commits into from
Aug 28, 2021
Merged

Improve testing text #3447

merged 30 commits into from
Aug 28, 2021

Conversation

yminsky
Copy link
Member

@yminsky yminsky commented Jul 26, 2021

No description provided.

match Queue.peek t.events with
| None -> ()
| Some time ->
if Time_ns.Span.( >= ) (Time_ns.diff t.now time) t.period
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little hard to read. Perhaps break up into two lines?

let diff = Time_ns.diff t.now time in
if Time_ns.Span.(diff >= t.period)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the proposed style because it opens up Span and it's unclear what identifiers might be shadowed in such expressions.

Really, we need modular implicits to make this kind of code nice! (And Flambda, to make it fast again.)

@yminsky yminsky merged commit 30805de into master Aug 28, 2021
@yminsky yminsky deleted the improve-testing-text branch August 28, 2021 17:16
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