Skip to content

Commit 9919ec3

Browse files
committed
clippy lints
1 parent 2c8a144 commit 9919ec3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/widgets/pages/hypertext.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,14 @@ impl Hypertext {
287287
}
288288
gemini::Tag::Link(url, label) => {
289289
let link_char = if let Ok(true) = self
290-
.parse_link(&url)
290+
.parse_link(url)
291291
.map(|url| ["gemini", "about"].contains(&url.scheme()))
292292
{
293293
"⇒"
294294
} else {
295295
"⇗"
296296
};
297-
let label = format!("{link_char} {}", label.as_deref().unwrap_or(&url));
297+
let label = format!("{link_char} {}", label.as_deref().unwrap_or(url));
298298
let tag = {
299299
let mut text_iter = buffer.end_iter();
300300
let start = text_iter.offset();
@@ -318,11 +318,8 @@ impl Hypertext {
318318
}
319319
gemini::Tag::Heading(1) => {
320320
let mut title = self.imp().title.borrow_mut();
321-
match &*title {
322-
None => {
323-
*title = Some(Title::Incomplete(String::new()));
324-
}
325-
_ => {}
321+
if title.is_none() {
322+
*title = Some(Title::Incomplete(String::new()));
326323
}
327324
}
328325

src/widgets/tab.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl Tab {
154154
// If there's an in flight request, the related history item (the last one)
155155
// must be removed
156156
if let Some(in_flight_req) = imp.req_handle.borrow_mut().take() {
157-
if let None = in_flight_req.now_or_never() {
157+
if in_flight_req.now_or_never().is_none() {
158158
imp.history.borrow_mut().pop();
159159
let i = imp.current_hi.get().unwrap();
160160
imp.current_hi.replace(Some(i - 1));

0 commit comments

Comments
 (0)