Skip to content

Commit

Permalink
refactor: ♻️ as suggested by clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
M1n-74316D65 committed May 28, 2024
1 parent 09c9db9 commit 6774df4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,37 +193,37 @@ fn main() {
match result {
Ok(mut config) => match &args.subcommand {
Some(CliSub::Add(args)) => {
if let Some(val) = env::var("api_omg_lol").ok() {
if let Ok(val) = env::var("api_omg_lol") {
config.api_key = val;
}
petition_manager::add(args, config);
}
Some(CliSub::Search(args)) => {
if let Some(val) = env::var("api_omg_lol").ok() {
if let Ok(val) = env::var("api_omg_lol") {
config.api_key = val;
}
petition_manager::search(args, config);
}
Some(CliSub::Download(args)) => {
if let Some(val) = env::var("api_omg_lol").ok() {
if let Ok(val) = env::var("api_omg_lol") {
config.api_key = val;
}
petition_manager::download(args, config);
}
Some(CliSub::View(args)) => {
if let Some(val) = env::var("api_omg_lol").ok() {
if let Ok(val) = env::var("api_omg_lol") {
config.api_key = val;
}
petition_manager::view(args, config);
}
Some(CliSub::Remove(args)) => {
if let Some(val) = env::var("api_omg_lol").ok() {
if let Ok(val) = env::var("api_omg_lol") {
config.api_key = val;
}
petition_manager::remove(args, config);
}
Some(CliSub::List(_)) => {
if let Some(val) = env::var("api_omg_lol").ok() {
if let Ok(val) = env::var("api_omg_lol") {
config.api_key = val;
}
petition_manager::list(config);
Expand Down

0 comments on commit 6774df4

Please sign in to comment.