refactor: pedantic cargo clippy, do not use Results for always-succeeding functions
This commit is contained in:
@@ -24,7 +24,7 @@ pub struct WidgetLabel {
|
||||
}
|
||||
|
||||
impl WidgetLabel {
|
||||
pub fn create(i18n: &mut I18n, params: WidgetLabelParams) -> anyhow::Result<WidgetState> {
|
||||
pub fn create(i18n: &mut I18n, params: WidgetLabelParams) -> WidgetState {
|
||||
let metrics = Metrics::from(¶ms.style);
|
||||
let attrs = Attrs::from(¶ms.style);
|
||||
let wrap = Wrap::from(¶ms.style);
|
||||
@@ -39,7 +39,7 @@ impl WidgetLabel {
|
||||
[(params.content.generate(i18n).as_ref(), attrs)],
|
||||
&Attrs::new(),
|
||||
Shaping::Advanced,
|
||||
params.style.align.map(|a| a.into()),
|
||||
params.style.align.map(Into::into),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ impl WidgetLabel {
|
||||
[(self.params.content.generate(i18n).as_ref(), attrs)],
|
||||
&Attrs::new(),
|
||||
Shaping::Advanced,
|
||||
self.params.style.align.map(|a| a.into()),
|
||||
self.params.style.align.map(Into::into),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user