chore: clippy warnings
This commit is contained in:
@@ -135,7 +135,7 @@ Find more on the [Aiken's user manual](https://aiken-lang.org).
|
||||
}
|
||||
|
||||
fn write(path: PathBuf, contents: &str) -> miette::Result<()> {
|
||||
let mut f = fs::File::create(&path).into_diagnostic()?;
|
||||
let mut f = fs::File::create(path).into_diagnostic()?;
|
||||
|
||||
f.write_all(contents.as_bytes()).into_diagnostic()?;
|
||||
Ok(())
|
||||
|
||||
@@ -32,7 +32,7 @@ pub fn exec(
|
||||
let mut program = if cbor {
|
||||
let cbor_hex = std::fs::read_to_string(&script).into_diagnostic()?;
|
||||
|
||||
let raw_cbor = hex::decode(&cbor_hex).into_diagnostic()?;
|
||||
let raw_cbor = hex::decode(cbor_hex).into_diagnostic()?;
|
||||
|
||||
let prog = Program::<FakeNamedDeBruijn>::from_cbor(&raw_cbor, &mut Vec::new())
|
||||
.into_diagnostic()?;
|
||||
|
||||
@@ -61,7 +61,7 @@ pub fn exec(
|
||||
format!("{}.flat", input.file_stem().unwrap().to_str().unwrap())
|
||||
};
|
||||
|
||||
fs::write(&out_name, &bytes).into_diagnostic()?;
|
||||
fs::write(out_name, &bytes).into_diagnostic()?;
|
||||
}
|
||||
} else {
|
||||
let cbor = program.to_hex().into_diagnostic()?;
|
||||
@@ -75,7 +75,7 @@ pub fn exec(
|
||||
format!("{}.cbor", input.file_stem().unwrap().to_str().unwrap())
|
||||
};
|
||||
|
||||
fs::write(&out_name, &cbor).into_diagnostic()?;
|
||||
fs::write(out_name, &cbor).into_diagnostic()?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ pub fn exec(
|
||||
format!("{}.uplc", input.file_stem().unwrap().to_str().unwrap())
|
||||
};
|
||||
|
||||
fs::write(&out_name, pretty).into_diagnostic()?;
|
||||
fs::write(out_name, pretty).into_diagnostic()?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -84,6 +84,9 @@ impl telemetry::EventListener for Terminal {
|
||||
telemetry::Event::ParsingProjectFiles => {
|
||||
println!("{}", "...Parsing project files".bold().purple());
|
||||
}
|
||||
telemetry::Event::WaitingForBuildDirLock => {
|
||||
println!("{}", "...Waiting for build directory lock".bold().purple());
|
||||
}
|
||||
telemetry::Event::TypeChecking => {
|
||||
println!("{}", "...Type-checking project".bold().purple());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user