ui: Fix doctest (#12985)

Fix the documentation tests failed when running `cargo test --workspace`

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
Yan Qian 2024-06-14 08:32:41 +08:00 committed by GitHub
parent 0ed5327b1c
commit 8edfd0a963
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ impl Label {
/// ```
/// use ui::prelude::*;
///
/// let my_label = Label::new("Hello, World!").single_line(true);
/// let my_label = Label::new("Hello, World!").single_line();
/// ```
pub fn single_line(mut self) -> Self {
self.single_line = true;