Moved main to top
parent
bfd57f39a8
commit
4ed6600ebc
20
src/main.rs
20
src/main.rs
|
@ -2,6 +2,16 @@ use std::path::PathBuf;
|
|||
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
|
||||
let verbosity = get_verbosity(cli);
|
||||
|
||||
println!("verbosity = {}", verbosity);
|
||||
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
||||
// Initialize CLI arguments using clap
|
||||
#[derive(Parser)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
|
@ -34,16 +44,6 @@ enum Command {
|
|||
Grade,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
|
||||
let verbosity = get_verbosity(cli);
|
||||
|
||||
println!("verbosity = {}", verbosity);
|
||||
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
||||
fn get_verbosity(cli: Cli) -> u8 {
|
||||
// Check the user defined verbosity, if none, set to normal
|
||||
let verbosity: u8;
|
||||
|
|
Loading…
Reference in New Issue