metadata: Fix cargo clippy (#1574)

* metadata: Fix cargo clippy

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* subxt/backend: Fix clone clippy

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* tests: Use clone into

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-05-06 11:11:39 +03:00
committed by GitHub
parent bc079e7c98
commit a5d94a4b8b
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -344,7 +344,7 @@ fn generate_outer_enums(
let Some(last) = call_path.last_mut() else {
return Err(TryFromError::InvalidTypePath("RuntimeCall".into()));
};
*last = "RuntimeError".to_owned();
"RuntimeError".clone_into(last);
generate_outer_error_enum_type(metadata, call_path)
};
@@ -267,8 +267,9 @@ impl<Hash: BlockHash> Shared<Hash> {
shared.seen_runtime_events.clear();
init_message.finalized_block_hashes =
finalized_ev.finalized_block_hashes.clone();
init_message
.finalized_block_hashes
.clone_from(&finalized_ev.finalized_block_hashes);
if let Some(runtime_ev) = newest_runtime {
init_message.finalized_block_runtime = Some(runtime_ev);
@@ -70,7 +70,7 @@ impl MetadataTestRunnerCaseBuilder {
/// Set the test name.
pub fn name(mut self, name: impl AsRef<str>) -> Self {
self.name = name.as_ref().to_owned();
name.as_ref().clone_into(&mut self.name);
self
}