Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix doc comments for `StyledText` (#10058)

Marshall Bowersf19e84dc221c
diff --git a/crates/gpui/src/elements/text.rs b/crates/gpui/src/elements/text.rs
index 8ca5c39026a..7278560dc2b 100644
--- a/crates/gpui/src/elements/text.rs
+++ b/crates/gpui/src/elements/text.rs
@@ -118,7 +118,7 @@ impl StyledText {
}
}
- /// Lets you modify the text
+ /// Sets the text for this [`StyledText`].
pub fn with_text(mut self, text: impl Into<SharedString>) -> Self {
self.text = text.into();
self
@@ -152,7 +152,7 @@ impl StyledText {
self
}
- /// line_layout returns metadata about how the line will be rendered
+ /// Lays out this line of [`StyledText`] at the specified font size.
pub fn layout_line(
&self,
font_size: Pixels,