diff --git a/leo/commands/new/new.rs b/leo/commands/init/init.rs similarity index 96% rename from leo/commands/new/new.rs rename to leo/commands/init/init.rs index 183361ecf7..6505eeb710 100644 --- a/leo/commands/new/new.rs +++ b/leo/commands/init/init.rs @@ -13,15 +13,15 @@ use std::path::PathBuf; use structopt::StructOpt; #[derive(Debug, StructOpt)] -pub struct NewCommand { +pub struct InitCommand { #[structopt(parse(from_os_str))] path: PathBuf, } -impl CLI for NewCommand { +impl CLI for InitCommand { type Options = (); - const NAME: NameType = "new"; + const NAME: NameType = "init"; const ABOUT: AboutType = "Creates a new Leo package (include -h for more options)"; const FLAGS: &'static [FlagType] = &[]; const OPTIONS: &'static [OptionType] = &[]; diff --git a/leo/commands/init/mod.rs b/leo/commands/init/mod.rs new file mode 100644 index 0000000000..2d5b8771e7 --- /dev/null +++ b/leo/commands/init/mod.rs @@ -0,0 +1,2 @@ +pub mod init; +pub use self::init::*; diff --git a/leo/commands/mod.rs b/leo/commands/mod.rs index 7bb1ce1ed0..dda8b56111 100644 --- a/leo/commands/mod.rs +++ b/leo/commands/mod.rs @@ -2,5 +2,5 @@ pub mod cli; pub mod cli_types; -pub mod new; -pub use self::new::*; +pub mod init; +pub use self::init::*; diff --git a/leo/commands/new/mod.rs b/leo/commands/new/mod.rs deleted file mode 100644 index cbfcd90e50..0000000000 --- a/leo/commands/new/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod new; -pub use self::new::*; diff --git a/leo/main.rs b/leo/main.rs index 086b87575f..a04b94bb1c 100644 --- a/leo/main.rs +++ b/leo/main.rs @@ -23,7 +23,7 @@ // } // // impl Benchmark { -// pub fn new() -> Self { +// pub fn init() -> Self { // Self { // _engine: PhantomData, // } @@ -56,16 +56,16 @@ // } // // fn main() { -// let mut setup = Duration::new(0, 0); -// let mut proving = Duration::new(0, 0); -// let mut verifying = Duration::new(0, 0); +// let mut setup = Duration::init(0, 0); +// let mut proving = Duration::init(0, 0); +// let mut verifying = Duration::init(0, 0); // // let rng = &mut thread_rng(); // // let start = Instant::now(); // // let params = { -// let circuit = Benchmark::::new(); +// let circuit = Benchmark::::init(); // generate_random_parameters::(circuit, rng).unwrap() // }; // @@ -75,7 +75,7 @@ // // let start = Instant::now(); // let proof = { -// let c = Benchmark::new(); +// let c = Benchmark::init(); // create_random_proof(c, ¶ms, rng).unwrap() // }; // @@ -99,7 +99,7 @@ // println!(" Verifier output : {}", is_success); // println!(" "); // -// // let mut cs = TestConstraintSystem::::new(); +// // let mut cs = TestConstraintSystem::::init(); // // // // println!("\n satisfied: {:?}", cs.is_satisfied()); // // @@ -110,7 +110,7 @@ // // // } -use leo::commands::{cli::*, NewCommand}; +use leo::commands::{cli::*, InitCommand}; use leo::errors::CLIError; use clap::{App, AppSettings}; @@ -128,14 +128,14 @@ fn main() -> Result<(), CLIError> { AppSettings::SubcommandRequiredElseHelp, ]) .subcommands(vec![ - NewCommand::new(), + InitCommand::new(), ]) .set_term_width(0) .get_matches(); match arguments.subcommand() { - // ("new", Some(arguments)) => { + // ("init", Some(arguments)) => { // NewCommand::().output(NewCommand::parse(arguments)?) // }, _ => unreachable!(),