Cargo fmt
This commit is contained in:
parent
a747b03c17
commit
27e2d682a5
2 changed files with 64 additions and 68 deletions
|
|
@ -235,7 +235,8 @@ impl PasswordManager {
|
||||||
|
|
||||||
// Don't do anything if nothing have changed
|
// Don't do anything if nothing have changed
|
||||||
if let Some(original) = &original
|
if let Some(original) = &original
|
||||||
&& original == &input_state.input {
|
&& original == &input_state.input
|
||||||
|
{
|
||||||
return Task::none();
|
return Task::none();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -247,15 +248,12 @@ impl PasswordManager {
|
||||||
} else {
|
} else {
|
||||||
if let Some(original) = original
|
if let Some(original) = original
|
||||||
&& original.identifier != identifier
|
&& original.identifier != identifier
|
||||||
&& let Err(err) =
|
&& let Err(err) = store::delete_password(original.identifier.clone()).await
|
||||||
store::delete_password(original.identifier.clone()).await
|
|
||||||
{
|
{
|
||||||
return Message::PasswordManager(PasswordManagerMessage::Error(
|
return Message::PasswordManager(PasswordManagerMessage::Error(format!(
|
||||||
format!(
|
|
||||||
"Failed to delete password {}: {err}",
|
"Failed to delete password {}: {err}",
|
||||||
original.identifier
|
original.identifier
|
||||||
),
|
)));
|
||||||
));
|
|
||||||
}
|
}
|
||||||
Message::PasswordManager(PasswordManagerMessage::None)
|
Message::PasswordManager(PasswordManagerMessage::None)
|
||||||
}
|
}
|
||||||
|
|
@ -312,8 +310,7 @@ impl PasswordManager {
|
||||||
.spacing(space_xxs),
|
.spacing(space_xxs),
|
||||||
);
|
);
|
||||||
|
|
||||||
if expanded
|
if expanded && let Some(input_state) = &self.input_state {
|
||||||
&& let Some(input_state) = &self.input_state {
|
|
||||||
let expanded_section: Section<'_, Message> = widget::settings::section().add(
|
let expanded_section: Section<'_, Message> = widget::settings::section().add(
|
||||||
widget::column::with_children(vec![
|
widget::column::with_children(vec![
|
||||||
widget::column::with_children(vec![
|
widget::column::with_children(vec![
|
||||||
|
|
@ -356,9 +353,7 @@ impl PasswordManager {
|
||||||
PasswordManagerMessage::PasswordInputAndUpdate(text),
|
PasswordManagerMessage::PasswordInputAndUpdate(text),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.on_unfocus(Message::PasswordManager(
|
.on_unfocus(Message::PasswordManager(PasswordManagerMessage::Update))
|
||||||
PasswordManagerMessage::Update,
|
|
||||||
))
|
|
||||||
.into(),
|
.into(),
|
||||||
])
|
])
|
||||||
.spacing(space_xxxs)
|
.spacing(space_xxxs)
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,8 @@ impl ShortcutsConfig {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if let Some(default_action) = self.defaults.0.get(binding)
|
if let Some(default_action) = self.defaults.0.get(binding)
|
||||||
&& *default_action == reset_action {
|
&& *default_action == reset_action
|
||||||
|
{
|
||||||
// Remove binding that overrode a default
|
// Remove binding that overrode a default
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue