mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
zkas: formatting, typos, clippy
This commit is contained in:
@@ -270,18 +270,16 @@ impl Analyzer {
|
||||
v.column,
|
||||
))
|
||||
}
|
||||
} else if arg_types[0] == VarType::ScalarArray {
|
||||
if var_type != VarType::Scalar {
|
||||
return Err(self.error.abort(
|
||||
&format!(
|
||||
"Incorrect argument type. Expected `{:?}`, got `{:?}`.",
|
||||
VarType::Scalar,
|
||||
var_type
|
||||
),
|
||||
v.line,
|
||||
v.column,
|
||||
))
|
||||
}
|
||||
} else if arg_types[0] == VarType::ScalarArray && var_type != VarType::Scalar {
|
||||
return Err(self.error.abort(
|
||||
&format!(
|
||||
"Incorrect argument type. Expected `{:?}`, got `{:?}`.",
|
||||
VarType::Scalar,
|
||||
var_type
|
||||
),
|
||||
v.line,
|
||||
v.column,
|
||||
))
|
||||
}
|
||||
// Validation for non-Array types
|
||||
if var_type != arg_types[idx] {
|
||||
|
||||
@@ -124,7 +124,7 @@ impl Parser {
|
||||
let mut ast_inner = IndexMap::new();
|
||||
let mut ast = IndexMap::new();
|
||||
|
||||
if self.tokens.len() == 0 {
|
||||
if self.tokens.is_empty() {
|
||||
return Err(self.error.abort("Source file does not contain any valid tokens.", 0, 0))
|
||||
}
|
||||
|
||||
@@ -1056,7 +1056,7 @@ impl Parser {
|
||||
// x => unimplemented!("{:#?}", x),
|
||||
_ => {
|
||||
return Err(self.error.abort(
|
||||
&format!("Characer is illegal/unimplemented in this context",),
|
||||
"Character is illegal/unimplemented in this context",
|
||||
arg.line,
|
||||
arg.column,
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user