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

editoast: make intersection as a type #8897

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

woshilapin
Copy link
Contributor

Might help #8794 (comment). And in general, explicit typing is not necessarily bad, just more verbose.

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.

Project coverage is 37.19%. Comparing base (a184fb5) to head (dc827c6).
Report is 16 commits behind head on dev.

Files with missing lines Patch % Lines
editoast/src/views/path/projection.rs 96.42% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #8897      +/-   ##
============================================
+ Coverage     37.11%   37.19%   +0.08%     
- Complexity     2211     2245      +34     
============================================
  Files          1260     1260              
  Lines        115145   115468     +323     
  Branches       3230     3267      +37     
============================================
+ Hits          42737    42953     +216     
- Misses        70475    70569      +94     
- Partials       1933     1946      +13     
Flag Coverage Δ
core 74.79% <ø> (+0.12%) ⬆️
editoast 72.59% <97.05%> (+0.02%) ⬆️
front 15.17% <100.00%> (-0.01%) ⬇️
gateway 2.20% <ø> (ø)
osrdyne 2.60% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@woshilapin woshilapin force-pushed the wsl/editoast/feat/intersection-as-a-type branch from cd98dc3 to 9f8b3a1 Compare September 17, 2024 13:33
@woshilapin woshilapin marked this pull request as ready for review September 17, 2024 13:48
@woshilapin woshilapin requested a review from a team as a code owner September 17, 2024 13:48
@emersion
Copy link
Member

FWIW I think it's completely fine to use tuples in internal editoast APIs. I don't think it's a big deal if we need to convert them before sending them over HTTP.

@woshilapin
Copy link
Contributor Author

FWIW I think it's completely fine to use tuples in internal editoast APIs. I don't think it's a big deal if we need to convert them before sending them over HTTP.

Well, to me, (u64, u64) doesn't give a clue about what is each integer. But a Intersection { start: u64, end: u64 } does give a hint about what you can expect, and as code, not as comment (so always up-to-date). So I do believe it's often an improvement.

Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

Nice improvement:)

Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this PR

@woshilapin woshilapin added this pull request to the merge queue Sep 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 18, 2024
@woshilapin woshilapin force-pushed the wsl/editoast/feat/intersection-as-a-type branch 2 times, most recently from 08a956c to 1da8257 Compare September 20, 2024 15:48
@woshilapin woshilapin force-pushed the wsl/editoast/feat/intersection-as-a-type branch from 1da8257 to 65cf266 Compare September 23, 2024 13:35
@woshilapin woshilapin force-pushed the wsl/editoast/feat/intersection-as-a-type branch from 65cf266 to 95b0d70 Compare September 24, 2024 09:18
@woshilapin woshilapin force-pushed the wsl/editoast/feat/intersection-as-a-type branch from 95b0d70 to dc827c6 Compare September 24, 2024 10:28
@woshilapin woshilapin added this pull request to the merge queue Sep 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 24, 2024
@woshilapin woshilapin added this pull request to the merge queue Sep 24, 2024
Merged via the queue into dev with commit 8ddd549 Sep 24, 2024
23 checks passed
@woshilapin woshilapin deleted the wsl/editoast/feat/intersection-as-a-type branch September 24, 2024 12:15
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.

6 participants