mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 17:31:03 +00:00
tweak some pattern matches to address a new clippy warning
This commit is contained in:
@@ -83,7 +83,7 @@ async fn get_core_availability(
|
||||
sender: &Mutex<&mut impl SubsystemSender<overseer::BitfieldSigningOutgoingMessages>>,
|
||||
span: &jaeger::Span,
|
||||
) -> Result<bool, Error> {
|
||||
if let &CoreState::Occupied(ref core) = core {
|
||||
if let CoreState::Occupied(core) = core {
|
||||
let _span = span.child("query-chunk-availability");
|
||||
|
||||
let (tx, rx) = oneshot::channel();
|
||||
|
||||
@@ -65,7 +65,7 @@ where
|
||||
}
|
||||
|
||||
'outer: loop {
|
||||
let &(ref last_hash, ref last_header) = ancestry
|
||||
let (last_hash, last_header) = ancestry
|
||||
.last()
|
||||
.expect("ancestry has length 1 at initialization and is only added to; qed");
|
||||
|
||||
|
||||
@@ -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