chore(clippy): comply with new only_used_in_recursion rule.
This commit is contained in:
parent
efc9017fac
commit
dddfea4a62
1 changed files with 12 additions and 12 deletions
|
@ -24,7 +24,7 @@ pub fn decompile(ctx: &Context, output: &mut dyn Write) -> Result<(), Error> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn decompile_type(ty: Arc<Type>, ctx: &Context, output: &mut dyn Write) -> Result<(), Error> {
|
pub fn decompile_type(ty: Arc<Type>, _ctx: &Context, output: &mut dyn Write) -> Result<(), Error> {
|
||||||
match ty.as_ref() {
|
match ty.as_ref() {
|
||||||
Type::Struct {
|
Type::Struct {
|
||||||
name,
|
name,
|
||||||
|
@ -147,12 +147,12 @@ pub fn decompile_type(ty: Arc<Type>, ctx: &Context, output: &mut dyn Write) -> R
|
||||||
}
|
}
|
||||||
if tv.is_link() {
|
if tv.is_link() {
|
||||||
let target = tv.target().unwrap();
|
let target = tv.target().unwrap();
|
||||||
decompile_type(target, ctx, output)?;
|
decompile_type(target, _ctx, output)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Type::Alias { target, .. } => {
|
Type::Alias { target, .. } => {
|
||||||
decompile_type(target.clone(), ctx, output)?;
|
decompile_type(target.clone(), _ctx, output)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,13 +224,13 @@ pub fn decompile_function(
|
||||||
|
|
||||||
fn decompile_expression(
|
fn decompile_expression(
|
||||||
expr: &Expression,
|
expr: &Expression,
|
||||||
ctx: &Context,
|
_ctx: &Context,
|
||||||
output: &mut dyn Write,
|
output: &mut dyn Write,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
match &expr.value {
|
match &expr.value {
|
||||||
ExpressionValue::Array(elements) => {
|
ExpressionValue::Array(elements) => {
|
||||||
for element in elements.iter() {
|
for element in elements.iter() {
|
||||||
decompile_expression(element, ctx, output)?;
|
decompile_expression(element, _ctx, output)?;
|
||||||
}
|
}
|
||||||
writeln!(
|
writeln!(
|
||||||
output,
|
output,
|
||||||
|
@ -252,7 +252,7 @@ fn decompile_expression(
|
||||||
}
|
}
|
||||||
ExpressionValue::Constructor(elements) => {
|
ExpressionValue::Constructor(elements) => {
|
||||||
for element in elements.iter() {
|
for element in elements.iter() {
|
||||||
decompile_expression(element, ctx, output)?;
|
decompile_expression(element, _ctx, output)?;
|
||||||
}
|
}
|
||||||
writeln!(
|
writeln!(
|
||||||
output,
|
output,
|
||||||
|
@ -274,7 +274,7 @@ fn decompile_expression(
|
||||||
writeln!(output, " {}: load {}", expr.r#type.to_string(), name)?;
|
writeln!(output, " {}: load {}", expr.r#type.to_string(), name)?;
|
||||||
}
|
}
|
||||||
ExpressionValue::Index { expr, field_name } => {
|
ExpressionValue::Index { expr, field_name } => {
|
||||||
decompile_expression(expr.as_ref(), ctx, output)?;
|
decompile_expression(expr.as_ref(), _ctx, output)?;
|
||||||
writeln!(
|
writeln!(
|
||||||
output,
|
output,
|
||||||
" {}: index {}",
|
" {}: index {}",
|
||||||
|
@ -291,7 +291,7 @@ fn decompile_expression(
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
ExpressionValue::Let { name, value } => {
|
ExpressionValue::Let { name, value } => {
|
||||||
decompile_expression(value.as_ref(), ctx, output)?;
|
decompile_expression(value.as_ref(), _ctx, output)?;
|
||||||
writeln!(output, " {}: store {}", expr.r#type.to_string(), name)?;
|
writeln!(output, " {}: store {}", expr.r#type.to_string(), name)?;
|
||||||
}
|
}
|
||||||
ExpressionValue::LocalCall {
|
ExpressionValue::LocalCall {
|
||||||
|
@ -300,7 +300,7 @@ fn decompile_expression(
|
||||||
} => {
|
} => {
|
||||||
// decompile_expression(receiver.as_ref(), ctx, output)?;
|
// decompile_expression(receiver.as_ref(), ctx, output)?;
|
||||||
for argument in arguments.iter() {
|
for argument in arguments.iter() {
|
||||||
decompile_expression(argument, ctx, output)?;
|
decompile_expression(argument, _ctx, output)?;
|
||||||
}
|
}
|
||||||
match &receiver.value {
|
match &receiver.value {
|
||||||
ExpressionValue::GetLocal(name) => {
|
ExpressionValue::GetLocal(name) => {
|
||||||
|
@ -317,8 +317,8 @@ fn decompile_expression(
|
||||||
}
|
}
|
||||||
ExpressionValue::Map(values) => {
|
ExpressionValue::Map(values) => {
|
||||||
for (key, value) in values.iter() {
|
for (key, value) in values.iter() {
|
||||||
decompile_expression(key, ctx, output)?;
|
decompile_expression(key, _ctx, output)?;
|
||||||
decompile_expression(value, ctx, output)?;
|
decompile_expression(value, _ctx, output)?;
|
||||||
}
|
}
|
||||||
writeln!(
|
writeln!(
|
||||||
output,
|
output,
|
||||||
|
@ -333,7 +333,7 @@ fn decompile_expression(
|
||||||
arguments,
|
arguments,
|
||||||
} => {
|
} => {
|
||||||
for argument in arguments.iter() {
|
for argument in arguments.iter() {
|
||||||
decompile_expression(argument, ctx, output)?;
|
decompile_expression(argument, _ctx, output)?;
|
||||||
}
|
}
|
||||||
writeln!(
|
writeln!(
|
||||||
output,
|
output,
|
||||||
|
|
Loading…
Reference in a new issue