This commit is contained in:
damirka 2021-08-19 17:03:12 +03:00
parent df0d129947
commit 79fb41eac4
2 changed files with 6 additions and 8 deletions

View File

@ -17,7 +17,9 @@
use crate::{commands::Command, context::Context};
use leo_compiler::OutputFile;
use leo_errors::Result;
use leo_package::outputs::{ChecksumFile, CircuitFile, ProofFile, ProvingKeyFile, Snapshot, SnapshotFile, VerificationKeyFile};
use leo_package::outputs::{
ChecksumFile, CircuitFile, ProofFile, ProvingKeyFile, Snapshot, SnapshotFile, VerificationKeyFile,
};
use structopt::StructOpt;
use tracing::span::Span;

View File

@ -20,12 +20,7 @@ use crate::outputs::OUTPUTS_DIRECTORY_NAME;
use leo_errors::{PackageError, Result};
use serde::Deserialize;
use std::{
borrow::Cow,
fmt,
fs,
path::Path,
};
use std::{borrow::Cow, fmt, fs, path::Path};
/// Enum to handle all 3 types of snapshots.
#[derive(Deserialize)]
@ -76,7 +71,8 @@ impl SnapshotFile {
pub fn read_from(&self, path: &Path) -> Result<String> {
let path = self.snapshot_file_path(path);
let result = fs::read_to_string(&path).map_err(|_| PackageError::failed_to_read_snapshot_file(path.into_owned()))?;
let result =
fs::read_to_string(&path).map_err(|_| PackageError::failed_to_read_snapshot_file(path.into_owned()))?;
Ok(result)
}