File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -400,9 +400,7 @@ pub async fn handle_commands(
400400 use obws:: requests:: ui:: OpenVideoMixProjector ;
401401 use obws:: requests:: ui:: VideoMixType :: Program as OpenVideoMixProjectorType ;
402402 println ! ( "Open fullscreen projector" ) ;
403- let monitor_list_res = client. ui ( ) . list_monitors ( ) . await ;
404- if monitor_list_res. is_ok ( ) {
405- let monitor_list = monitor_list_res. unwrap ( ) ;
403+ if let Ok ( monitor_list) = client. ui ( ) . list_monitors ( ) . await {
406404 if monitor_list. len ( ) > ( * monitor_index as usize ) {
407405 let res = client
408406 . ui ( )
@@ -428,9 +426,7 @@ pub async fn handle_commands(
428426 use obws:: requests:: ui:: Location :: MonitorIndex as MonitorLocationIndex ;
429427 use obws:: requests:: ui:: OpenSourceProjector ;
430428 println ! ( "Open source projector" ) ;
431- let monitor_list_res = client. ui ( ) . list_monitors ( ) . await ;
432- if monitor_list_res. is_ok ( ) {
433- let monitor_list = monitor_list_res. unwrap ( ) ;
429+ if let Ok ( monitor_list) = client. ui ( ) . list_monitors ( ) . await {
434430 if monitor_list. len ( ) > ( * monitor_index as usize ) {
435431 let res = client
436432 . ui ( )
You can’t perform that action at this time.
0 commit comments