Don't return Result from TextStyle::highlight

This commit is contained in:
Antonio Scandurra 2023-11-15 09:10:46 +01:00
parent 48b3a90fbf
commit 1def355d44
4 changed files with 13 additions and 27 deletions

View file

@ -157,7 +157,7 @@ impl Default for TextStyle {
}
impl TextStyle {
pub fn highlight(mut self, style: HighlightStyle) -> Result<Self> {
pub fn highlight(mut self, style: HighlightStyle) -> Self {
if let Some(weight) = style.font_weight {
self.font_weight = weight;
}
@ -177,7 +177,7 @@ impl TextStyle {
self.underline = Some(underline);
}
Ok(self)
self
}
pub fn font(&self) -> Font {