mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 07:07:07 +03:00
fix clippy lints
This commit is contained in:
parent
b32bfba376
commit
3226120503
@ -253,7 +253,7 @@ fn run_test(test: Test, handler: &Handler, err_buf: &BufferEmitter) -> Result<Va
|
||||
|
||||
// Write the program string to a file in the temporary directory.
|
||||
let path = directory.join("main.aleo");
|
||||
let mut file = File::create(&path).unwrap();
|
||||
let mut file = File::create(path).unwrap();
|
||||
file.write_all(bytecode.as_bytes()).unwrap();
|
||||
|
||||
// Create the manifest file.
|
||||
@ -261,7 +261,7 @@ fn run_test(test: Test, handler: &Handler, err_buf: &BufferEmitter) -> Result<Va
|
||||
|
||||
// Create the build directory.
|
||||
let build_directory = directory.join("build");
|
||||
std::fs::create_dir_all(&build_directory).unwrap();
|
||||
std::fs::create_dir_all(build_directory).unwrap();
|
||||
|
||||
// Open the package at the temporary directory.
|
||||
let _package = handler.extend_if_error(Package::<Testnet3>::open(&directory).map_err(LeoError::Anyhow))?;
|
||||
|
@ -73,7 +73,7 @@ impl Context {
|
||||
let build_manifest_path = build_path.join(Manifest::<Network>::file_name());
|
||||
|
||||
// Write the file.
|
||||
File::create(&build_manifest_path)
|
||||
File::create(build_manifest_path)
|
||||
.map_err(PackageError::failed_to_open_manifest)?
|
||||
.write_all(manifest_string.as_bytes())
|
||||
.map_err(PackageError::failed_to_open_manifest)?;
|
||||
|
@ -65,7 +65,7 @@ impl InputFile {
|
||||
/// Writes the standard input format to a file.
|
||||
pub fn write_to(self, path: &Path) -> Result<()> {
|
||||
let path = self.setup_file_path(path);
|
||||
let mut file = File::create(&path).map_err(PackageError::io_error_input_file)?;
|
||||
let mut file = File::create(path).map_err(PackageError::io_error_input_file)?;
|
||||
|
||||
file.write_all(self.template().as_bytes())
|
||||
.map_err(PackageError::io_error_input_file)?;
|
||||
|
@ -60,7 +60,7 @@ impl ChecksumFile {
|
||||
/// Writes the given checksum to a file.
|
||||
pub fn write_to(&self, path: &Path, checksum: String) -> Result<()> {
|
||||
let path = self.setup_file_path(path);
|
||||
let mut file = File::create(&path).map_err(PackageError::io_error_checksum_file)?;
|
||||
let mut file = File::create(path).map_err(PackageError::io_error_checksum_file)?;
|
||||
|
||||
file.write_all(checksum.as_bytes())
|
||||
.map_err(PackageError::io_error_checksum_file)?;
|
||||
|
@ -60,7 +60,7 @@ impl CircuitFile {
|
||||
/// Writes the given serialized struct to a file.
|
||||
pub fn write_to(&self, path: &Path, circuit: String) -> Result<()> {
|
||||
let path = self.setup_file_path(path);
|
||||
let mut file = File::create(&path).map_err(PackageError::io_error_circuit_file)?;
|
||||
let mut file = File::create(path).map_err(PackageError::io_error_circuit_file)?;
|
||||
|
||||
file.write_all(circuit.as_bytes())
|
||||
.map_err(PackageError::io_error_circuit_file)?;
|
||||
|
Loading…
Reference in New Issue
Block a user