Removes unnecessary blank impl for Backend (#8897)

* Removes unnecessary blank impl for Backend

This commit removes a from my perspective unneccessary implementation
for &T which implement Backend.

The current implementation exists (again from my perspective) solely
to satisfy a methods &mut self parameters (i.e. allows to satisfy
this for an & reference via using &mut &Backend).

As all implementors use a RefCell with borrow_mut() where actually
calling the mentioned &mut self method and then forwad to the
{} implementation of either TrieBackend or ProvingBackend, the
current &mut self seems to be not needed.

* Fixed tests client
This commit is contained in:
Frederik Schulz authored and GitHub committed 2021-05-25 19:50:12 +00:00
1 parent ec409615a3
commit ad76ac798e
10 files changed
+12 -92

No files matched your search

@@ -167,7 +167,7 @@ fn construct_block(
};
let hash = header.hash();
let mut overlay = OverlayedChanges::default();
let backend_runtime_code = sp_state_machine::backend::BackendRuntimeCode::new(&backend);
let backend_runtime_code = sp_state_machine::backend::BackendRuntimeCode::new(backend);
let runtime_code = backend_runtime_code.runtime_code().expect("Code is part of the backend");
let task_executor = Box::new(TaskExecutor::new());