From 067983bb5758d1b2caec4821bbbe640e07485e59 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sun, 21 Feb 2021 15:44:01 +0800 Subject: [PATCH] Fix codegen tests. --- codegen/src/function.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/codegen/src/function.rs b/codegen/src/function.rs index abf398b2..8738b410 100644 --- a/codegen/src/function.rs +++ b/codegen/src/function.rs @@ -411,6 +411,8 @@ impl Parse for ExportedFn { } impl ExportedFn { + #![allow(unused)] + pub fn params(&self) -> &ExportedFnParams { &self.params } @@ -708,13 +710,6 @@ impl ExportedFn { pub fn generate_impl(&self, on_type_name: &str) -> proc_macro2::TokenStream { let sig_name = self.name().clone(); - let name = self - .params - .name - .last() - .cloned() - .unwrap_or_else(|| self.name().to_string()); - let arg_count = self.arg_count(); let is_method_call = self.mutable_receiver();