Skip to content

Commit f745e73

Browse files
committed
removed redundant use terminal_clipboard
1 parent 22b605e commit f745e73

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/main.rs

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use terminal_clipboard;
21
mod cache;
32
mod decompose;
43
mod gpt3;
@@ -21,15 +20,13 @@ enum PostprocessAction {
2120

2221
fn get_postprocess_action() -> PostprocessAction {
2322
match std::env::var("GPT_POST") {
24-
Ok(val) => {
25-
match val.as_str() {
26-
"confirm" => PostprocessAction::Confirm,
27-
"copy" => PostprocessAction::Copy,
28-
"out" => PostprocessAction::Out,
29-
_ => PostprocessAction::Confirm
30-
}
31-
}
32-
Err(_) => PostprocessAction::Confirm
23+
Ok(val) => match val.as_str() {
24+
"confirm" => PostprocessAction::Confirm,
25+
"copy" => PostprocessAction::Copy,
26+
"out" => PostprocessAction::Out,
27+
_ => PostprocessAction::Confirm,
28+
},
29+
Err(_) => PostprocessAction::Confirm,
3330
}
3431
}
3532

@@ -109,7 +106,8 @@ async fn async_main() {
109106
eprintln!(
110107
"Please set the GPT3_API_KEY environment variable to your OpenAI API key."
111108
);
112-
} else {}
109+
} else {
110+
}
113111
std::process::exit(1);
114112
}
115113

0 commit comments

Comments
 (0)