fix all clippy

This commit is contained in:
2023-02-17 17:51:39 +01:00
parent 0cbd1790b0
commit 6be8482b46
5 changed files with 48 additions and 48 deletions

View File

@@ -37,7 +37,7 @@ impl FormatTypeFuncs for FormatTypeFunc {
&self,
representation: &str,
ref_name: &str,
input: bool,
_input: bool,
) -> String {
let mut rep = representation.to_string();
rep.push_str(&format_name(ref_name));

View File

@@ -5,8 +5,8 @@ use genco::quote;
use genco::tokens::quoted;
use crate::functions::{
type_field_has_optional, type_ref_is_list, type_ref_is_list_of_objects, type_ref_is_object,
type_ref_is_optional, type_ref_is_scalar, CommonFunctions,
type_field_has_optional, type_ref_is_list_of_objects, type_ref_is_object,
type_ref_is_optional, CommonFunctions,
};
use crate::utility::OptionExt;
@@ -53,7 +53,7 @@ pub fn format_function(funcs: &CommonFunctions, field: &FullTypeFields) -> Optio
})
}
fn render_required_args(funcs: &CommonFunctions, field: &FullTypeFields) -> Option<rust::Tokens> {
fn render_required_args(_funcs: &CommonFunctions, field: &FullTypeFields) -> Option<rust::Tokens> {
if let Some(args) = field.args.as_ref() {
let args = args
.into_iter()
@@ -83,7 +83,7 @@ fn render_required_args(funcs: &CommonFunctions, field: &FullTypeFields) -> Opti
}
}
fn render_optional_args(funcs: &CommonFunctions, field: &FullTypeFields) -> Option<rust::Tokens> {
fn render_optional_args(_funcs: &CommonFunctions, field: &FullTypeFields) -> Option<rust::Tokens> {
if let Some(args) = field.args.as_ref() {
let args = args
.into_iter()

View File

@@ -31,7 +31,7 @@ impl Generator for RustGenerator {
handlers: VisitHandlers {
visit_scalar: Arc::new({
let render = render.clone();
let common_funcs = common_funcs.clone();
let _common_funcs = common_funcs.clone();
move |t| {
println!("generating scalar");
@@ -83,7 +83,7 @@ impl Generator for RustGenerator {
}),
visit_enum: Arc::new({
let render = render.clone();
let common_funcs = common_funcs.clone();
let _common_funcs = common_funcs.clone();
move |t| {
println!("generating enum");