We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 578ec6f + 3920cac commit a9a7668Copy full SHA for a9a7668
src/lib.rs
@@ -1,4 +1,6 @@
1
//! Newtypes for working with text sizes/ranges in a more type-safe manner.
2
+//!
3
+//! Minimal Supported Rust Version: latest stable.
4
5
#![forbid(unsafe_code)]
6
#![warn(missing_debug_implementations, missing_docs)]
src/traits.rs
@@ -1,7 +1,4 @@
-use {
- crate::{TextRange, TextSize},
- std::convert::TryInto,
-};
+use {crate::TextSize, std::convert::TryInto};
/// Text-like structures that have a text size.
7
pub trait TextSized: Copy {
@@ -27,9 +24,3 @@ impl TextSized for char {
27
24
TextSize(self.len_utf8() as u32)
28
25
}
29
26
30
-
31
-impl TextSized for TextRange {
32
- fn text_size(self) -> TextSize {
33
- self.len()
34
- }
35
-}
0 commit comments