mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
remove unsafe unwrap
This commit is contained in:
parent
efd193f187
commit
64cc9fa9c9
@ -55,12 +55,9 @@ impl Command for Setup {
|
||||
let path = context.dir()?;
|
||||
let package_name = context.manifest()?.get_package_name();
|
||||
|
||||
// If Build failed - exit.
|
||||
if input.is_none() {
|
||||
return Err(anyhow!("Unable to build, check that main file exists"));
|
||||
}
|
||||
// Check if leo build failed
|
||||
let (program, checksum_differs) = input.ok_or(anyhow!("Unable to build, check that main file exists"))?;
|
||||
|
||||
let (program, checksum_differs) = input.unwrap();
|
||||
// Check if a proving key and verification key already exists
|
||||
let keys_exist = ProvingKeyFile::new(&package_name).exists_at(&path)
|
||||
&& VerificationKeyFile::new(&package_name).exists_at(&path);
|
||||
|
Loading…
Reference in New Issue
Block a user