Skip to content

Commit ac45c85

Browse files
committed
Remove Display for TextSize
1 parent ea66e56 commit ac45c85

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub struct TextRange {
3737

3838
impl fmt::Debug for TextRange {
3939
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
40-
write!(f, "[{}..{})", self.start(), self.end())
40+
write!(f, "[{}..{})", self.start().raw, self.end().raw)
4141
}
4242
}
4343

src/size.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,7 @@ pub(crate) const fn TextSize(raw: u32) -> TextSize {
3232

3333
impl fmt::Debug for TextSize {
3434
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35-
fmt::Display::fmt(self, f)
36-
}
37-
}
38-
39-
impl fmt::Display for TextSize {
40-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
41-
fmt::Display::fmt(&self.raw, f)
35+
write!(f, "{}", self.raw)
4236
}
4337
}
4438

0 commit comments

Comments
 (0)