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

Add getters for ComponentRange #565

Closed
wants to merge 1 commit into from
Closed

Add getters for ComponentRange #565

wants to merge 1 commit into from

Conversation

a1ien
Copy link

@a1ien a1ien commented Apr 11, 2023

This methods is useful if you want to implement custom error printing.

This methods is useful if you want to implement custom error printing.
@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Merging #565 (0183065) into main (aab760f) will decrease coverage by 0.1%.
The diff coverage is 0.0%.

@@           Coverage Diff           @@
##            main    #565     +/-   ##
=======================================
- Coverage   95.7%   95.6%   -0.1%     
=======================================
  Files         78      78             
  Lines       8703    8711      +8     
=======================================
- Hits        8330    8329      -1     
- Misses       373     382      +9     
Impacted Files Coverage Δ
time/src/error/component_range.rs 79.5% <0.0%> (-20.5%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jhpratt
Copy link
Member

jhpratt commented Apr 11, 2023

This is deliberately private, as I do not want to guarantee the type being stored.

@jhpratt jhpratt closed this Apr 11, 2023
@jhpratt jhpratt added C-feature-request Category: a new feature (not already implemented) A-core Area: anything not otherwise covered labels Apr 11, 2023
@a1ien
Copy link
Author

a1ien commented Apr 11, 2023

Suggest then how to customize the error message. How to get what range is incorrect?
For example, in the current display implementation, you print the range as 1..=30, but this does not look good for the user interface.

@jhpratt
Copy link
Member

jhpratt commented Apr 11, 2023

Currently, you cannot obtain the range of validity, at least easily. I suppose you could work from the component name and whether it's conditional to determine the name, but that's about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: anything not otherwise covered C-feature-request Category: a new feature (not already implemented)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants