@@ -24,9 +24,8 @@ mod custom_button;
24
24
mod subprocess;
25
25
mod processor;
26
26
27
- use std:: ffi:: OsStr ;
28
-
29
27
// Imports
28
+ use std:: ffi:: OsStr ;
30
29
use gtk:: prelude:: * ;
31
30
use gtk:: {
32
31
/* Libraries */ gio,
@@ -93,37 +92,25 @@ fn build_ui(app: &Application) {
93
92
] ,
94
93
None :: < & gio:: Cancellable > ,
95
94
) {
96
- Ok ( return_val) => {
97
- match return_val {
98
- ( None , None ) => println ! ( "no stdout or stderr, something went really wrong..." ) ,
99
- ( None , Some ( stderr_buffer) ) => {
100
- match std:: str:: from_utf8 ( & stderr_buffer) {
101
- Ok ( stderr_buffer_contents) => println ! ( "Process failed with error: {}" , stderr_buffer_contents) ,
102
- Err ( err) => panic ! ( "{}" , err) ,
103
- }
95
+ Ok ( return_val) => match return_val {
96
+ ( None , None ) => println ! ( "no stdout or stderr, something went really wrong..." ) ,
97
+ ( None , Some ( stderr_buffer) ) => match std:: str:: from_utf8 ( & stderr_buffer) {
98
+ Ok ( stderr_buffer_contents) => println ! ( "Process failed with error: {}" , stderr_buffer_contents) ,
99
+ Err ( err) => panic ! ( "{}" , err) ,
100
+ } ,
101
+ ( Some ( stdout_buffer) , None ) => match std:: str:: from_utf8 ( & stdout_buffer) {
102
+ Ok ( stdout_buffer_contents) => println ! ( "Process suceeded, returning: {}" , stdout_buffer_contents) ,
103
+ Err ( err) => panic ! ( "{}" , err) ,
104
+ } ,
105
+ ( Some ( stdout_buffer) , Some ( stderr_buffer) ) => match std:: str:: from_utf8 ( & stdout_buffer) {
106
+ Ok ( stdout_buffer_contents) => match std:: str:: from_utf8 ( & stderr_buffer) {
107
+ Ok ( stderr_buffer_contents) => println ! ( "Process suceeded, returning: {} but with error: {}" , stdout_buffer_contents, stderr_buffer_contents) ,
108
+ Err ( err) => panic ! ( "{}" , err) ,
104
109
} ,
105
- ( Some ( stdout_buffer) , None ) => {
106
- match std:: str:: from_utf8 ( & stdout_buffer) {
107
- Ok ( stdout_buffer_contents) => println ! ( "Process suceeded, returning: {}" , stdout_buffer_contents) ,
108
- Err ( err) => panic ! ( "{}" , err) ,
109
- }
110
- } ,
111
- ( Some ( stdout_buffer) , Some ( stderr_buffer) ) => {
112
- match std:: str:: from_utf8 ( & stdout_buffer) {
113
- Ok ( stdout_buffer_contents) => {
114
- match std:: str:: from_utf8 ( & stderr_buffer) {
115
- Ok ( stderr_buffer_contents) => println ! ( "Process suceeded, returning: {} but with error: {}" , stdout_buffer_contents, stderr_buffer_contents) ,
116
- Err ( err) => panic ! ( "{}" , err) ,
117
- }
118
- } ,
119
- Err ( err) => panic ! ( "{}" , err) ,
120
- }
121
- } ,
122
- }
123
- }
124
- Err ( _y) => {
125
- println ! ( "something went wrong!" ) ; //DEBUG
110
+ Err ( err) => panic ! ( "{}" , err) ,
111
+ } ,
126
112
}
113
+ Err ( _y) => println ! ( "something went wrong!" ) , //DEBUG
127
114
} ;
128
115
} ) ;
129
116
0 commit comments