Skip to content

Commit a9a7668

Browse files
authored
Merge pull request #3 from rust-analyzer/small-things
Remove things
2 parents 578ec6f + 3920cac commit a9a7668

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Newtypes for working with text sizes/ranges in a more type-safe manner.
2+
//!
3+
//! Minimal Supported Rust Version: latest stable.
24
35
#![forbid(unsafe_code)]
46
#![warn(missing_debug_implementations, missing_docs)]

src/traits.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use {
2-
crate::{TextRange, TextSize},
3-
std::convert::TryInto,
4-
};
1+
use {crate::TextSize, std::convert::TryInto};
52

63
/// Text-like structures that have a text size.
74
pub trait TextSized: Copy {
@@ -27,9 +24,3 @@ impl TextSized for char {
2724
TextSize(self.len_utf8() as u32)
2825
}
2926
}
30-
31-
impl TextSized for TextRange {
32-
fn text_size(self) -> TextSize {
33-
self.len()
34-
}
35-
}

0 commit comments

Comments
 (0)