Clarify docs of Text::color_maybe

This commit is contained in:
Héctor Ramón Jiménez 2024-03-08 13:51:34 +01:00
parent 3e99f39a86
commit 8919f2593e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -83,7 +83,7 @@ where
self
}
/// Sets the [`Color`] of the [`Text`].
/// Sets the [`Color`] of the [`Text`], if `Some`.
pub fn color_maybe(mut self, color: Option<impl Into<Color>>) -> Self {
self.style = Style::Colored(color.map(Into::into));
self