mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
tweak some pattern matches to address a new clippy warning
This commit is contained in:
@@ -1291,7 +1291,7 @@ impl<T: Config> Pallet<T> {
|
||||
// First, we need to decide what we should use as the base configuration.
|
||||
let mut base_config = pending_configs
|
||||
.last()
|
||||
.map(|&(_, ref config)| config.clone())
|
||||
.map(|(_, config)| config.clone())
|
||||
.unwrap_or_else(Self::config);
|
||||
let base_config_consistent = base_config.check_consistency().is_ok();
|
||||
|
||||
|
||||
@@ -643,7 +643,7 @@ impl<T: Config> Pallet<T> {
|
||||
};
|
||||
|
||||
// one more sweep for actually writing to storage.
|
||||
let core_indices = core_indices_and_backers.iter().map(|&(ref c, _, _)| *c).collect();
|
||||
let core_indices = core_indices_and_backers.iter().map(|(c, _, _)| *c).collect();
|
||||
for (candidate, (core, backers, group)) in
|
||||
candidates.into_iter().zip(core_indices_and_backers)
|
||||
{
|
||||
|
||||
@@ -1260,13 +1260,13 @@ impl<T: Config> Pallet<T> {
|
||||
UpcomingUpgrades::<T>::mutate(|upcoming_upgrades| {
|
||||
*upcoming_upgrades = mem::take(upcoming_upgrades)
|
||||
.into_iter()
|
||||
.filter(|&(ref para, _)| !outgoing.contains(para))
|
||||
.filter(|(para, _)| !outgoing.contains(para))
|
||||
.collect();
|
||||
});
|
||||
UpgradeCooldowns::<T>::mutate(|upgrade_cooldowns| {
|
||||
*upgrade_cooldowns = mem::take(upgrade_cooldowns)
|
||||
.into_iter()
|
||||
.filter(|&(ref para, _)| !outgoing.contains(para))
|
||||
.filter(|(para, _)| !outgoing.contains(para))
|
||||
.collect();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ impl<T: Config> Pallet<T> {
|
||||
pub(crate) fn initializer_on_new_session(
|
||||
notification: &SessionChangeNotification<T::BlockNumber>,
|
||||
) {
|
||||
let &SessionChangeNotification { ref validators, ref new_config, .. } = notification;
|
||||
let SessionChangeNotification { validators, new_config, .. } = notification;
|
||||
let config = new_config;
|
||||
|
||||
let mut thread_queue = ParathreadQueue::<T>::get();
|
||||
|
||||
Reference in New Issue
Block a user