-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Hacktoberfestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededin progress
Description
We recently added these docs:
Lines 54 to 58 in ce391ed
| /// Construct a [Range] that counts up to the given item. | |
| /// | |
| /// # Panics | |
| /// | |
| /// This function will panic when trying to create a [Range] where the upper bound is less than the lower bound. |
This behavior is tested in this unit test:
Lines 393 to 397 in ce391ed
| #[test] | |
| #[should_panic] | |
| fn fail_up_to_invalid_range() { | |
| from(40).up_to(39); | |
| } |
It is also possible for this to become a doc test (as I've just found out), which would make this more visible.
- Turn
fail_up_to_invalid_rangeandfail_down_to_invalid_rangetests into doc tests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Hacktoberfestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededin progress