fix leo clippy

This commit is contained in:
gluax 2022-02-16 10:22:15 -08:00
parent 305ef16883
commit ec11c2adaf
5 changed files with 14 additions and 43 deletions

31
Cargo.lock generated
View File

@ -1105,31 +1105,6 @@ dependencies = [
"anyhow",
]
[[package]]
name = "leo-asg"
version = "1.5.3"
dependencies = [
"criterion",
"indexmap",
"leo-ast",
"leo-ast-passes",
"leo-errors",
"leo-parser",
"num-bigint",
"serde",
"serde_json",
"tendril",
"typed-arena",
]
[[package]]
name = "leo-asg-passes"
version = "1.5.3"
dependencies = [
"leo-asg",
"leo-errors",
]
[[package]]
name = "leo-ast"
version = "1.5.3"
@ -2663,12 +2638,6 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]]
name = "typed-arena"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0685c84d5d54d1c26f7d3eb96cd41550adb97baed141a761cf335d3d33bcd0ae"
[[package]]
name = "typenum"
version = "1.15.0"

View File

@ -28,9 +28,9 @@ path = "leo/main.rs"
[workspace]
members = [
# "asg",
"asg-passes",
# "asg-passes",
"ast",
# "ast-passes",
"ast-passes",
"compiler",
"errors",
"grammar",

View File

@ -18,8 +18,9 @@ use crate::{commands::Command, context::Context};
use leo_compiler::Compiler;
use leo_errors::{CliError, Result};
use leo_package::{
inputs::*,
outputs::{ChecksumFile, CircuitFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME},
// inputs::*,
// outputs::CircuitFile
outputs::{ChecksumFile, OutputsDirectory, OUTPUTS_DIRECTORY_NAME},
source::{MainFile, MAIN_FILENAME, SOURCE_DIRECTORY_NAME},
};
@ -93,6 +94,7 @@ pub struct BuildOptions {
#[derive(StructOpt, Debug)]
#[structopt(setting = structopt::clap::AppSettings::ColoredHelp)]
pub struct Build {
#[allow(dead_code)]
#[structopt(flatten)]
pub(crate) compiler_options: BuildOptions,
}

View File

@ -29,7 +29,7 @@ use commands::{
// Deploy, Init, Lint, New, Prove, Run, Setup, Test, Update, Watch,
};
use leo_errors::Result;
use snarkvm_utilities::Write;
// use snarkvm_utilities::Write;
use std::{path::PathBuf, process::exit};
use structopt::{clap::AppSettings, StructOpt};

View File

@ -15,9 +15,9 @@
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use leo_errors::Result;
use std::path::PathBuf;
// use std::path::PathBuf;
use crate::{
/* use crate::{
commands::{
// package::{Login, Logout},
Build,
@ -25,11 +25,11 @@ use crate::{
// Prove, Run, Setup, Test,
},
context::{create_context, Context},
};
}; */
/// Path to the only complex Leo program that we have
/// - relative to source dir - where Cargo.toml is located
const PEDERSEN_HASH_PATH: &str = "./examples/pedersen-hash/";
// const PEDERSEN_HASH_PATH: &str = "./examples/pedersen-hash/";
#[test]
pub fn init_logger() -> Result<()> {
@ -218,10 +218,10 @@ pub fn format_event() -> Result<()> {
// Ok(())
// }
/// Create context for Pedersen Hash example
fn context() -> Result<Context> {
// /// Create context for Pedersen Hash example
/* fn context() -> Result<Context> {
let path = PathBuf::from(&PEDERSEN_HASH_PATH);
let context = create_context(path, None)?;
Ok(context)
}
} */