chore: clippy autofix

This commit is contained in:
rvcas
2023-02-01 13:08:54 -05:00
committed by Lucas
parent 4530507109
commit a365649360
24 changed files with 104 additions and 110 deletions

View File

@@ -124,7 +124,7 @@ impl TryFrom<String> for Purpose {
"mint" => Ok(Purpose::Mint),
"withdraw" => Ok(Purpose::Withdraw),
"publish" => Ok(Purpose::Publish),
unexpected => Err(format!("Can't turn '{}' into any Purpose", unexpected)),
unexpected => Err(format!("Can't turn '{unexpected}' into any Purpose")),
}
}
}
@@ -248,7 +248,7 @@ mod test {
let validator = Validator::from_checked_module(&modules, &mut generator, validator, def)
.expect("Failed to create validator blueprint");
println!("{}", validator);
println!("{validator}");
assert_json_eq!(serde_json::to_value(&validator).unwrap(), json);
}

View File

@@ -156,10 +156,10 @@ impl Error {
match self {
Error::List(errors) => {
for error in errors {
eprintln!("Error: {:?}", error)
eprintln!("Error: {error:?}")
}
}
rest => eprintln!("Error: {:?}", rest),
rest => eprintln!("Error: {rest:?}"),
}
}
@@ -581,7 +581,7 @@ impl Warning {
}
pub fn report(&self) {
eprintln!("Warning: {:?}", self)
eprintln!("Warning: {self:?}")
}
}

View File

@@ -31,7 +31,7 @@ fn process_stdin(check: bool) -> Result<(), Error> {
aiken_lang::format::pretty(&mut out, module, extra, &src);
if !check {
print!("{}", out);
print!("{out}");
return Ok(());
}