Skip to content

Commit

Permalink
Fix Clippy warnings and loan success message
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonid Kozarin committed Sep 27, 2024
1 parent d66f9f1 commit 81635ab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ commands:
agree: "I'm in!"
disagree: "Disagree"
callback:
success: "Perk «Where is my centimeters, Lebowski?» has been assigned successfully!"
success: "The microloan has been issued successfully!"
refused: "The patient refused gender reassignment on credit."
payout_ratio_changed: "The payout rate has been changed since you sent the loan application. Please, invoke the command again."
errors:
Expand Down
2 changes: 1 addition & 1 deletion locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ commands:
agree: "Согласен"
disagree: "Я пас"
callback:
success: "Перк «Где мои сантиметры, Лебовски?» успешно предоставлен!"
success: "Микрозайм успешно предоставлен!"
refused: "Пациент отказался от смены пола в кредит."
payout_ratio_changed: "С момента подачи заявления ставка выплаты изменилась. Пожалуйста, вызовите команду ещё раз."
errors:
Expand Down
1 change: 1 addition & 0 deletions src/config/toggles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::sync::{Arc, RwLock};
const CACHED_ENV_TOGGLES_POISONED_MSG: &str = "CachedEnvToggles map was poisoned";

#[derive(Copy, Clone, Default, derive_more::FromStr, derive_more::Display)]
#[allow(clippy::upper_case_acronyms)]
pub enum DickOfDaySelectionMode {
WEIGHTS,
EXCLUSION,
Expand Down
4 changes: 2 additions & 2 deletions src/repo/announcements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl Announcements {
}

async fn check_conditions(&self, chat_id_kind: &ChatIdKind, announcement: &config::Announcement, lang_code: &LanguageCode) -> anyhow::Result<bool> {
let res = match self.get(&chat_id_kind, lang_code).await? {
let res = match self.get(chat_id_kind, lang_code).await? {
_ if self.announcements.max_shows == 0 => false,
Some(entity) if entity.hash[..] != announcement.hash[..] => {
self.update(entity.chat_id, lang_code, &announcement.hash).await?;
Expand All @@ -57,7 +57,7 @@ impl Announcements {
true
}
None => {
self.create(&chat_id_kind, lang_code, &announcement.hash).await?;
self.create(chat_id_kind, lang_code, &announcement.hash).await?;
true
}
};
Expand Down

0 comments on commit 81635ab

Please sign in to comment.