Easy PR: Fix warnings from latest nightly (#14195)

* unneeded mut

* remove needless borrows
This commit is contained in:
Squirrel
2023-05-23 16:06:48 +01:00
committed by GitHub
parent 0fd0fb44d6
commit ea21a495f8
13 changed files with 31 additions and 33 deletions
+3 -3
View File
@@ -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,