mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Readability fixes for cargo clippy
This commit is contained in:
@@ -18,10 +18,10 @@ impl ClanMember {
|
||||
(Typed::Str("userName".into()), Typed::Str(self.username.clone().into())),
|
||||
(Typed::Str("displayName".into()), Typed::Str(self.display_name.clone().into())),
|
||||
(Typed::Str("memberState".into()), Typed::Int(self.member_state as i32)),
|
||||
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar.into())),
|
||||
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar)),
|
||||
(Typed::Str("avatarId".into()), Typed::Int(self.avatar_id)),
|
||||
(Typed::Str("rank".into()), Typed::Int(self.rank as i32)),
|
||||
(Typed::Str("isOnline".into()), Typed::Bool(self.is_online.into())),
|
||||
(Typed::Str("isOnline".into()), Typed::Bool(self.is_online)),
|
||||
(Typed::Str("seasonXP".into()), Typed::Int(self.season_xp)),
|
||||
].into())
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ impl ClanInviteInfo {
|
||||
(Typed::Str("displayName".into()), Typed::Str(self.display_name.clone().into())),
|
||||
(Typed::Str("clanName".into()), Typed::Str(self.clan_name.clone().into())),
|
||||
(Typed::Str("clanSize".into()), Typed::Int(self.clan_size)),
|
||||
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar.into())),
|
||||
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar)),
|
||||
(Typed::Str("avatarId".into()), Typed::Int(self.avatar_id)),
|
||||
].into())
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ impl AvatarInfo {
|
||||
pub fn as_transmissible<C>(&self) -> Typed<C> {
|
||||
Typed::HashMap(vec![
|
||||
(Typed::Str("name".into()), Typed::Str(self.name.clone().into())),
|
||||
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar.into())),
|
||||
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar)),
|
||||
(Typed::Str("avatarId".into()), Typed::Int(self.avatar_id)),
|
||||
].into())
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ const PARAM_KEY: u8 = 60;
|
||||
pub(super) fn pending_battle_rewards_provider<C: Send + Sync>() -> SimpleFunc<54, crate::UserTy, impl (Fn(ParameterTable<C>, &crate::UserTy) -> Result<ParameterTable<C>, i16>) + Sync + Sync, C> {
|
||||
SimpleFunc::new(|params, _| {
|
||||
let mut params = params.to_dict();
|
||||
params.insert(PARAM_KEY, Typed::Bool(false.into()));
|
||||
params.insert(PARAM_KEY, Typed::Bool(false));
|
||||
Ok(params.into())
|
||||
})
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ const PLAYER_XP_PARAM_KEY: u8 = 57;
|
||||
pub(super) fn season_rewards_provider<C: Send + Sync>() -> SimpleFunc<50, crate::UserTy, impl (Fn(ParameterTable<C>, &crate::UserTy) -> Result<ParameterTable<C>, i16>) + Sync + Sync, C> {
|
||||
SimpleFunc::new(|params, _| {
|
||||
let mut params = params.to_dict();
|
||||
params.insert(MONTH_PARAM_KEY, Typed::Int(02));
|
||||
params.insert(MONTH_PARAM_KEY, Typed::Int(2));
|
||||
params.insert(YEAR_PARAM_KEY, Typed::Int(2025));
|
||||
params.insert(ROBITS_PARAM_KEY, Typed::Int(42));
|
||||
params.insert(IS_CLAIMED_PARAM_KEY, Typed::Bool(true.into()));
|
||||
params.insert(IS_CLAIMED_PARAM_KEY, Typed::Bool(true));
|
||||
params.insert(CLAN_AVERAGE_PARAM_KEY, Typed::Int(67));
|
||||
params.insert(CLAN_TOTAL_PARAM_KEY, Typed::Int(42_123));
|
||||
params.insert(CLAN_NAME_PARAM_KEY, Typed::Str("RE_clan_name_rewards".into()));
|
||||
|
||||
Reference in New Issue
Block a user