mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-01-22 04:58:35 +01:00
Fixed clippy lints
This commit is contained in:
parent
7154d38eb3
commit
45208d6ba4
@ -353,7 +353,7 @@ fn invert_fn_call(
|
|||||||
let mut parameters_iter = parameters.iter();
|
let mut parameters_iter = parameters.iter();
|
||||||
for argument in arguments {
|
for argument in arguments {
|
||||||
symbol_table.insert(Stmt::VarDecl(
|
symbol_table.insert(Stmt::VarDecl(
|
||||||
Identifier::from_full_name(¶meters_iter.next().unwrap().to_string()),
|
Identifier::from_full_name(parameters_iter.next().unwrap()),
|
||||||
Box::new(argument.clone()),
|
Box::new(argument.clone()),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -728,7 +728,7 @@ fn skip_newlines(context: &mut Context) {
|
|||||||
|
|
||||||
fn string_to_num(value: &str) -> Result<f64, KalkError> {
|
fn string_to_num(value: &str) -> Result<f64, KalkError> {
|
||||||
let base = get_base(value)?;
|
let base = get_base(value)?;
|
||||||
if let Some(result) = crate::radix::parse_float_radix(&value.replace(" ", ""), base) {
|
if let Some(result) = crate::radix::parse_float_radix(&value.replace(' ', ""), base) {
|
||||||
Ok(result)
|
Ok(result)
|
||||||
} else {
|
} else {
|
||||||
Err(KalkError::InvalidNumberLiteral(value.into()))
|
Err(KalkError::InvalidNumberLiteral(value.into()))
|
||||||
|
Loading…
Reference in New Issue
Block a user