Skip to content

Commit

Permalink
chore: fix or ignore all clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tvolk131 committed Sep 10, 2024
1 parent 0f5ce4f commit b33338f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/routes/bitcoin_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ impl Subroute {
pub struct List {}

impl List {
// TODO: Remove this clippy allow.
#[allow(clippy::unused_self)]
fn view<'a>(&self, connected_state: &ConnectedState) -> Column<'a, KeystacheMessage> {
let mut container = container("Wallet");

Expand Down
2 changes: 1 addition & 1 deletion src/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub enum RouteName {
}

impl RouteName {
pub fn is_same_top_level_route_as(self, other: &Self) -> bool {
pub fn is_same_top_level_route_as(&self, other: &Self) -> bool {
match self {
Self::Unlock => other == &Self::Unlock,
Self::Home => other == &Self::Home,
Expand Down
2 changes: 2 additions & 0 deletions src/routes/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ impl Main {
}
}

// TODO: Remove this clippy allow.
#[allow(clippy::struct_field_names)]
pub struct ChangePassword {
current_password_input: String,
new_password_input: String,
Expand Down
2 changes: 1 addition & 1 deletion src/ui_components/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub fn icon_button(
pub fn sidebar_button<'a>(
text_str: &'a str,
icon: SvgIcon,
self_route_name: RouteName,
self_route_name: &RouteName,
keystache: &Keystache,
) -> Button<'a, KeystacheMessage, Theme> {
let is_active = self_route_name.is_same_top_level_route_as(&keystache.page.to_name());
Expand Down
10 changes: 5 additions & 5 deletions src/ui_components/sidebar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ use crate::util::lighten;
pub fn sidebar(keystache: &Keystache) -> Element<KeystacheMessage> {
let sidebar = container(
column![
sidebar_button("Home", SvgIcon::Home, RouteName::Home, keystache)
sidebar_button("Home", SvgIcon::Home, &RouteName::Home, keystache)
.on_press(KeystacheMessage::Navigate(RouteName::Home)),
sidebar_button(
"Keys",
SvgIcon::Key,
RouteName::NostrKeypairs(nostr_keypairs::SubrouteName::List),
&RouteName::NostrKeypairs(nostr_keypairs::SubrouteName::List),
keystache
)
.on_press(KeystacheMessage::Navigate(RouteName::NostrKeypairs(
Expand All @@ -26,7 +26,7 @@ pub fn sidebar(keystache: &Keystache) -> Element<KeystacheMessage> {
sidebar_button(
"Relays",
SvgIcon::Hub,
RouteName::NostrRelays(nostr_relays::SubrouteName::List),
&RouteName::NostrRelays(nostr_relays::SubrouteName::List),
keystache
)
.on_press(KeystacheMessage::Navigate(RouteName::NostrRelays(
Expand All @@ -35,7 +35,7 @@ pub fn sidebar(keystache: &Keystache) -> Element<KeystacheMessage> {
sidebar_button(
"Wallet",
SvgIcon::CurrencyBitcoin,
RouteName::BitcoinWallet(bitcoin_wallet::SubrouteName::List),
&RouteName::BitcoinWallet(bitcoin_wallet::SubrouteName::List),
keystache
)
.on_press(KeystacheMessage::Navigate(RouteName::BitcoinWallet(
Expand All @@ -45,7 +45,7 @@ pub fn sidebar(keystache: &Keystache) -> Element<KeystacheMessage> {
sidebar_button(
"Settings",
SvgIcon::Settings,
RouteName::Settings(settings::SubrouteName::Main),
&RouteName::Settings(settings::SubrouteName::Main),
keystache
)
.on_press(KeystacheMessage::Navigate(RouteName::Settings(
Expand Down

0 comments on commit b33338f

Please sign in to comment.