Minor tweaks suggested by clippy (#10673)

* Minor tweaks suggested by clippy

* Fix typo caused by last commit

* Apply review suggestions
This commit is contained in:
Nazar Mokrynskyi
2022-01-15 22:00:12 +02:00
committed by GitHub
parent a534274c6f
commit 0bca06a483
5 changed files with 27 additions and 35 deletions
@@ -378,6 +378,7 @@ fn generate_call_api_at_calls(decl: &ItemTrait) -> Result<TokenStream> {
// Generate the generator function
result.push(quote!(
#[cfg(any(feature = "std", test))]
#[allow(clippy::too_many_arguments)]
pub fn #fn_name<
R: #crate_::Encode + #crate_::Decode + PartialEq,
NC: FnOnce() -> std::result::Result<R, #crate_::ApiError> + std::panic::UnwindSafe,
@@ -59,7 +59,7 @@ fn calling_native_runtime_function_with_non_decodable_parameter() {
.build();
let runtime_api = client.runtime_api();
let block_id = BlockId::Number(client.chain_info().best_number);
runtime_api.fail_convert_parameter(&block_id, DecodeFails::new()).unwrap();
runtime_api.fail_convert_parameter(&block_id, DecodeFails::default()).unwrap();
}
#[test]