mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 14:41:11 +00:00
Easy PR: Fix warnings from latest nightly (#14195)
* unneeded mut * remove needless borrows
This commit is contained in:
@@ -54,16 +54,16 @@ pub fn open<H: Clone + AsRef<[u8]>>(
|
||||
];
|
||||
|
||||
for i in compressed {
|
||||
let mut column = &mut config.columns[i as usize];
|
||||
let column = &mut config.columns[i as usize];
|
||||
column.compression = parity_db::CompressionType::Lz4;
|
||||
}
|
||||
|
||||
let mut state_col = &mut config.columns[columns::STATE as usize];
|
||||
let state_col = &mut config.columns[columns::STATE as usize];
|
||||
state_col.ref_counted = true;
|
||||
state_col.preimage = true;
|
||||
state_col.uniform = true;
|
||||
|
||||
let mut tx_col = &mut config.columns[columns::TRANSACTION as usize];
|
||||
let tx_col = &mut config.columns[columns::TRANSACTION as usize];
|
||||
tx_col.ref_counted = true;
|
||||
tx_col.preimage = true;
|
||||
tx_col.uniform = true;
|
||||
|
||||
@@ -168,7 +168,7 @@ impl<Block: BlockT> PinnedBlocksCache<Block> {
|
||||
/// Attach body to an existing cache item
|
||||
pub fn insert_body(&mut self, hash: Block::Hash, extrinsics: Option<Vec<Block::Extrinsic>>) {
|
||||
match self.cache.peek_mut(&hash) {
|
||||
Some(mut entry) => {
|
||||
Some(entry) => {
|
||||
entry.body = Some(extrinsics);
|
||||
log::trace!(
|
||||
target: LOG_TARGET,
|
||||
@@ -192,7 +192,7 @@ impl<Block: BlockT> PinnedBlocksCache<Block> {
|
||||
justifications: Option<Justifications>,
|
||||
) {
|
||||
match self.cache.peek_mut(&hash) {
|
||||
Some(mut entry) => {
|
||||
Some(entry) => {
|
||||
entry.justifications = Some(justifications);
|
||||
log::trace!(
|
||||
target: LOG_TARGET,
|
||||
|
||||
@@ -467,7 +467,7 @@ impl ConnectionHandler for NotifsHandler {
|
||||
match event {
|
||||
ConnectionEvent::FullyNegotiatedInbound(inbound) => {
|
||||
let (mut in_substream_open, protocol_index) = inbound.protocol;
|
||||
let mut protocol_info = &mut self.protocols[protocol_index];
|
||||
let protocol_info = &mut self.protocols[protocol_index];
|
||||
|
||||
match protocol_info.state {
|
||||
State::Closed { pending_opening } => {
|
||||
|
||||
@@ -150,7 +150,7 @@ where
|
||||
} else {
|
||||
values.key_values
|
||||
};
|
||||
let mut entry = self.state.entry(values.state_root).or_default();
|
||||
let entry = self.state.entry(values.state_root).or_default();
|
||||
if entry.0.len() > 0 && entry.1.len() > 1 {
|
||||
// Already imported child_trie with same root.
|
||||
// Warning this will not work with parallel download.
|
||||
|
||||
@@ -236,7 +236,7 @@ impl Index {
|
||||
let priority = Priority(statement.priority().unwrap_or(0));
|
||||
self.entries.insert(hash, (account, priority, statement.data_len()));
|
||||
self.total_size += statement.data_len();
|
||||
let mut account_info = self.accounts.entry(account).or_default();
|
||||
let account_info = self.accounts.entry(account).or_default();
|
||||
account_info.data_size += statement.data_len();
|
||||
if let Some(channel) = statement.channel() {
|
||||
account_info.channels.insert(channel, ChannelEntry { hash, priority });
|
||||
@@ -530,7 +530,7 @@ impl Store {
|
||||
|
||||
let mut config = parity_db::Options::with_columns(&path, col::COUNT);
|
||||
|
||||
let mut statement_col = &mut config.columns[col::STATEMENTS as usize];
|
||||
let statement_col = &mut config.columns[col::STATEMENTS as usize];
|
||||
statement_col.ref_counted = false;
|
||||
statement_col.preimage = true;
|
||||
statement_col.uniform = true;
|
||||
|
||||
Reference in New Issue
Block a user