File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11//! Newtypes for working with text sizes/ranges in a more type-safe manner.
22//!
33//! This library can help with two things:
4- //! * Reducing storage requirenments for offsets and ranges, under the
4+ //! * Reducing storage requirements for offsets and ranges, under the
55//! assumption that 32 bits is enough.
66//! * Providing standard vocabulary types for applications where text ranges
77//! are pervasive.
88//!
99//! However, you should not use this library simply because you work with
10- //! strings. In the overhelming majority of cases, using `usize` and
10+ //! strings. In the overwhelming majority of cases, using `usize` and
1111//! `std::ops::Range<usize>` is better. In particular, if you are publishing a
1212//! library, using only std types in the interface would make it more
1313//! interoperable. Similarly, if you are writing something like a lexer, which
14- //! produces, but does not *store* text ranges, than sticking to `usize` would
14+ //! produces, but does not *store* text ranges, then sticking to `usize` would
1515//! be better.
1616//!
1717//! Minimal Supported Rust Version: latest stable.
You can’t perform that action at this time.
0 commit comments