Skip to content

Commit ad9e99f

Browse files
committed
fix clippy issue
1 parent 00d5041 commit ad9e99f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ Rust.prototype.getCodePrefix = function () {
238238
const rsTemplate = template(
239239
`// @generated
240240
// Code generated by @open-rpc/generator DO NOT EDIT.
241+
#![allow(clippy::too_many_arguments)]
241242
242243
use jsonrpsee::core::{client::ClientT, ClientError as Error};
243244
@@ -258,14 +259,13 @@ impl <T: ClientT> <%= className %><T> {
258259
* <%= method.description %>
259260
*/
260261
pub async fn <%= normalizeMethodNameRust(method.name) %>(&self, <%= methodTypings.getParamsTyping("rust", method) %>) -> Result<<%= methodTypings.getTypingNames("rust", method).result %>, Error> {
261-
let method = "<%= method.name %>";
262262
<% const paramNames = extractParameterNames(methodTypings.getParamsTyping("rust", method)); %>
263263
<% if (paramNames.length > 0) { %>
264264
let mut params: serde_json::Map<String, serde_json::Value> = serde_json::Map::new();
265265
<% paramNames.forEach((paramName, index) => { %>params.insert("<%= paramName %>".to_string(), serde_json::to_value(<%= paramName %>).unwrap());<% }); %>
266266
<% } else { %>let params: serde_json::Map<String, serde_json::Value> = serde_json::Map::new();<% } %>
267267
268-
self.client.request(&method, params).await
268+
self.client.request("<%= method.name %>", params).await
269269
}
270270
<% }); %>
271271
}

0 commit comments

Comments
 (0)