Skip to content

Commit 476ac5c

Browse files
authored
Merge pull request #2053 from rkjnsn/patch-2
Fix typos in 1192-inclusive-ranges.md
2 parents 246ff86 + 746d2b3 commit 476ac5c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/1192-inclusive-ranges.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ more dots means more elements.
2626
`std::ops` defines
2727

2828
```rust
29-
pub enum RangeInclusive<T> {
30-
pub start: T,
31-
pub end: T,
29+
pub struct RangeInclusive<T> {
30+
pub start: T,
31+
pub end: T,
3232
}
3333

3434
pub struct RangeToInclusive<T> {
@@ -80,7 +80,7 @@ of this will have the range become `1...0` after yielding the final value,
8080
as that can be done using the `replace_one` and `replace_zero` methods on
8181
the existing (but unstable) [`Step` trait][step_trait]. It's expected,
8282
however, that the trait will change to allow more type-appropriate `impl`s.
83-
For example, a `num::BitInt` may rather become empty by incrementing `start`,
83+
For example, a `num::BigInt` may rather become empty by incrementing `start`,
8484
as `Range` does, since it doesn't to need to worry about overflow. Even for
8585
primitives, it could be advantageous to choose a different implementation,
8686
perhaps using `.overflowing_add(1)` and swapping on overflow, or `a...a`

0 commit comments

Comments
 (0)