Skip to content

Commit 1d46ef9

Browse files
committed
Fix clippy lints
1 parent 1126dae commit 1d46ef9

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/text_extensions/gemini.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
use crate::config;
2-
3-
use glib::IsA;
4-
use gtk::glib;
52
use gtk::prelude::*;
63

74
#[derive(Debug, Clone)]
@@ -32,7 +29,7 @@ impl Gemini {
3229
.fonts
3330
.heading
3431
.as_ref()
35-
.or_else(|| default_config.fonts.heading.as_ref())
32+
.or(default_config.fonts.heading.as_ref())
3633
.unwrap()
3734
});
3835
tag_h1.set_scale(2.0);
@@ -43,7 +40,7 @@ impl Gemini {
4340
.fonts
4441
.heading
4542
.as_ref()
46-
.or_else(|| default_config.fonts.heading.as_ref())
43+
.or(default_config.fonts.heading.as_ref())
4744
.unwrap()
4845
});
4946
tag_h2.set_scale(1.5);
@@ -55,7 +52,7 @@ impl Gemini {
5552
.fonts
5653
.heading
5754
.as_ref()
58-
.or_else(|| default_config.fonts.heading.as_ref())
55+
.or(default_config.fonts.heading.as_ref())
5956
.unwrap(),
6057
);
6158
tag_h2.set_scale(1.4);
@@ -67,7 +64,7 @@ impl Gemini {
6764
.fonts
6865
.paragraph
6966
.as_ref()
70-
.or_else(|| default_config.fonts.paragraph.as_ref())
67+
.or(default_config.fonts.paragraph.as_ref())
7168
.unwrap(),
7269
);
7370
let tag_q = Self::create_tag(
@@ -76,7 +73,7 @@ impl Gemini {
7673
.fonts
7774
.quote
7875
.as_ref()
79-
.or_else(|| default_config.fonts.quote.as_ref())
76+
.or(default_config.fonts.quote.as_ref())
8077
.unwrap(),
8178
);
8279
tag_q.set_style(gtk::pango::Style::Italic);
@@ -87,7 +84,7 @@ impl Gemini {
8784
.fonts
8885
.quote
8986
.as_ref()
90-
.or_else(|| default_config.fonts.paragraph.as_ref())
87+
.or(default_config.fonts.paragraph.as_ref())
9188
.unwrap(),
9289
);
9390

@@ -184,7 +181,7 @@ impl Gemini {
184181
.fonts
185182
.paragraph
186183
.as_ref()
187-
.or_else(|| default_config.fonts.paragraph.as_ref())
184+
.or(default_config.fonts.paragraph.as_ref())
188185
.unwrap();
189186

190187
let tag = gtk::builders::TextTagBuilder::new()

0 commit comments

Comments
 (0)