Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
jsonrpsee
Commits
610f635a
Unverified
Commit
610f635a
authored
Jun 23, 2022
by
Artem Vorotnikov
Committed by
GitHub
Jun 23, 2022
Browse files
Fix client generation with param_kind = map (#805)
parent
18a44498
Pipeline
#200068
passed with stages
in 8 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
proc-macros/src/render_client.rs
View file @
610f635a
...
...
@@ -156,6 +156,7 @@ impl RpcDescription {
});
match
param_kind
{
ParamKind
::
Map
=>
{
let
jsonrpsee
=
self
.jsonrpsee_client_path
.as_ref
()
.unwrap
();
// Extract parameter names.
let
param_names
=
extract_param_names
(
&
signature
.sig
);
// Combine parameter names and values into tuples.
...
...
@@ -165,7 +166,7 @@ impl RpcDescription {
quote!
{
(
#
param
,
#
value
)
}
});
quote!
{
Some
(
types
::
ParamsSer
::
Map
(
Some
(
#
jsonrpsee
::
types
::
ParamsSer
::
Map
(
std
::
collections
::
BTreeMap
::
<&
str
,
#
serde_json
::
Value
>
::
from
(
[
#
(
#
params
),
*
]
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment