Remove warnings from build and satisfied clippy (#1288)

* Prefixed unused functions with underscore

* Applied clippy lints

* Fixed some warnings and removed some `allow` statements
This commit is contained in:
Prikshit Gautam 2023-06-07 14:46:47 +05:30 committed by Keavon Chambers
parent 054acd3cc9
commit 70fcb35444
33 changed files with 54 additions and 60 deletions

View file

@ -614,7 +614,7 @@ impl NodeNetwork {
fn replace_network_outputs(&mut self, old_output: NodeOutput, new_output: NodeOutput) {
for output in self.outputs.iter_mut() {
if *output == old_output {
*output = new_output.clone();
*output = new_output;
}
}
}

View file

@ -544,9 +544,9 @@ impl TypingContext {
if matches!(input, Type::Generic(_)) {
return Err(format!("Generic types are not supported as inputs yet {:?} occured in {:?}", &input, node.identifier));
}
if parameters.iter().any(|p| match p {
Type::Fn(_, b) if matches!(b.as_ref(), Type::Generic(_)) => true,
_ => false,
if parameters.iter().any(|p| {
matches!(p,
Type::Fn(_, b) if matches!(b.as_ref(), Type::Generic(_)))
}) {
return Err(format!("Generic types are not supported in parameters: {:?} occured in {:?}", parameters, node.identifier));
}