Skip to content

Commit 73004bd

Browse files
committed
gpui
1 parent 8731454 commit 73004bd

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

crates/gpui/src/text_system.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,15 @@ pub struct TextRun {
670670
pub strikethrough: Option<StrikethroughStyle>,
671671
}
672672

673+
#[cfg(all(target_os = "macos", test))]
674+
impl TextRun {
675+
fn with_len(&self, len: usize) -> Self {
676+
let mut this = self.clone();
677+
this.len = len;
678+
this
679+
}
680+
}
681+
673682
/// An identifier for a specific glyph, as returned by [`TextSystem::layout_line`].
674683
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
675684
#[repr(C)]

crates/gpui/src/text_system/line_wrapper.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -543,14 +543,6 @@ mod tests {
543543
background_color: None,
544544
};
545545

546-
impl TextRun {
547-
fn with_len(&self, len: usize) -> Self {
548-
let mut this = self.clone();
549-
this.len = len;
550-
this
551-
}
552-
}
553-
554546
let text = "aa bbb cccc ddddd eeee".into();
555547
let lines = text_system
556548
.shape_text(

0 commit comments

Comments
 (0)