Skip to content

Commit 5ec22ce

Browse files
committed
fix clippy
1 parent 85ea6ea commit 5ec22ce

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

crates/conduit-wasm/src/app/home/tags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn Tags(props: &Props) -> Html {
3535
href=""
3636
class="tag-default tag-pill"
3737
{onclick}>
38-
{ &*tag }
38+
{ tag }
3939
</a>
4040
}
4141
})}

crates/conduit-wasm/src/components/article_preview.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub fn ArticlePreview(props: &Props) -> Html {
9797
{for article.tag_list.iter().map(|tag| {
9898
html! {
9999
<li class="tag-default tag-pill tag-outline" key={ (&tag).to_string() }>
100-
{ &*tag }
100+
{ tag }
101101
</li>
102102
}
103103
})}

crates/conduit-wasm/src/components/user_context_provider.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,8 @@ pub fn UserContextProvider(props: &Props) -> Html {
3434
user_ctx.set(user_info.user.clone());
3535
}
3636

37-
if let Some(error) = &current_user.error {
38-
match error {
39-
Error::Unauthorized | Error::Forbidden => set_token(None),
40-
_ => (),
41-
}
37+
if let Some(Error::Unauthorized | Error::Forbidden) = &current_user.error {
38+
set_token(None);
4239
}
4340
|| ()
4441
})

0 commit comments

Comments
 (0)