Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | lib/text-size/src/lib.rs | 2 | ||||
| -rw-r--r-- | lib/text-size/src/traits.rs | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/lib/text-size/src/lib.rs b/lib/text-size/src/lib.rs index dc1a09b22b..32262de12c 100644 --- a/lib/text-size/src/lib.rs +++ b/lib/text-size/src/lib.rs @@ -1,4 +1,6 @@ //! Newtypes for working with text sizes/ranges in a more type-safe manner. +//! +//! Minimal Supported Rust Version: latest stable. #![forbid(unsafe_code)] #![warn(missing_debug_implementations, missing_docs)] diff --git a/lib/text-size/src/traits.rs b/lib/text-size/src/traits.rs index 877f057895..d90f3d431c 100644 --- a/lib/text-size/src/traits.rs +++ b/lib/text-size/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. pub trait TextSized: Copy { @@ -27,9 +24,3 @@ impl TextSized for char { TextSize(self.len_utf8() as u32) } } - -impl TextSized for TextRange { - fn text_size(self) -> TextSize { - self.len() - } -} |