Commit f745e73 1 parent 22b605e commit f745e73 Copy full SHA for f745e73
File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 1
- use terminal_clipboard;
2
1
mod cache;
3
2
mod decompose;
4
3
mod gpt3;
@@ -21,15 +20,13 @@ enum PostprocessAction {
21
20
22
21
fn get_postprocess_action ( ) -> PostprocessAction {
23
22
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 ,
33
30
}
34
31
}
35
32
@@ -109,7 +106,8 @@ async fn async_main() {
109
106
eprintln ! (
110
107
"Please set the GPT3_API_KEY environment variable to your OpenAI API key."
111
108
) ;
112
- } else { }
109
+ } else {
110
+ }
113
111
std:: process:: exit ( 1 ) ;
114
112
}
115
113
You can’t perform that action at this time.
0 commit comments