Update `dynamic_text` builder doc comment (#6978)

This commit is contained in:
Chris Pryer 2023-08-29 10:29:11 -04:00 committed by GitHub
parent b7634b6ede
commit 924f10186f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -334,7 +334,8 @@ impl<Context> Format<Context> for SourcePosition {
} }
} }
/// Creates a text from a dynamic string with its optional start-position in the source document /// Creates a text from a dynamic string with its optional start-position in the source document.
/// This is done by allocating a new string internally.
pub fn dynamic_text(text: &str, position: Option<TextSize>) -> DynamicText { pub fn dynamic_text(text: &str, position: Option<TextSize>) -> DynamicText {
debug_assert_no_newlines(text); debug_assert_no_newlines(text);