Don't return Result
from TextStyle::highlight
This commit is contained in:
parent
48b3a90fbf
commit
1def355d44
4 changed files with 13 additions and 27 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue