Skip to content

Commit c64435d

Browse files
committed
fixed code not compiling
1 parent 6460a1b commit c64435d

File tree

1 file changed

+1
-42
lines changed

1 file changed

+1
-42
lines changed

src/main.rs

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -43,47 +43,6 @@ struct Cli {
4343
#[command(subcommand)]
4444
operation: Operation,
4545
}
46-
#[derive(Args)]
47-
struct Verbosity {
48-
///Suppress most output
49-
#[arg(long, global = true, short = 'q')]
50-
quiet: bool,
51-
52-
///More verbose logging
53-
#[arg(long, action=clap::ArgAction::Count, global = true, short = 'v')]
54-
verbose: u8,
55-
}
56-
impl Verbosity {
57-
fn log_level(&self) -> LogLevelNum {
58-
if self.quiet {
59-
return LogLevelNum::Off;
60-
}
61-
if self.verbose == 1 {
62-
return LogLevelNum::Debug;
63-
}
64-
if self.verbose > 1 {
65-
return LogLevelNum::Trace;
66-
}
67-
68-
LogLevelNum::Info
69-
}
70-
71-
fn is_quied(&self) -> bool {
72-
self.quiet
73-
}
74-
}
75-
impl fmt::Display for Verbosity {
76-
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
77-
fmt.write_str(match self.log_level() {
78-
LogLevelNum::Off => "QUIET",
79-
LogLevelNum::Error => "ERROR",
80-
LogLevelNum::Warn => "WARN",
81-
LogLevelNum::Info => "INFO",
82-
LogLevelNum::Debug => "DEBUG",
83-
LogLevelNum::Trace => "TRACE",
84-
})
85-
}
86-
}
8746

8847
#[derive(Subcommand, Copy, Clone)]
8948
pub enum Operation {
@@ -113,7 +72,7 @@ impl Operation {
11372
}
11473

11574
#[tokio::main]
116-
async fn main() -> ExitCode {
75+
async fn main() {
11776
let cli = Cli::parse();
11877

11978
stderrlog::new()

0 commit comments

Comments
 (0)