@@ -443,17 +443,15 @@ pub trait SeleniumManager {
443443 }
444444
445445 fn set_os ( & mut self , os : String ) {
446- let mut config = self . get_config_mut ( ) ;
447- config. os = os;
446+ self . get_config_mut ( ) . os = os;
448447 }
449448
450449 fn get_arch ( & self ) -> & str {
451450 self . get_config ( ) . arch . as_str ( )
452451 }
453452
454453 fn set_arch ( & mut self , arch : String ) {
455- let mut config = self . get_config_mut ( ) ;
456- config. arch = arch;
454+ self . get_config_mut ( ) . arch = arch;
457455 }
458456
459457 fn get_browser_version ( & self ) -> & str {
@@ -467,8 +465,7 @@ pub trait SeleniumManager {
467465
468466 fn set_browser_version ( & mut self , browser_version : String ) {
469467 if !browser_version. is_empty ( ) {
470- let mut config = self . get_config_mut ( ) ;
471- config. browser_version = browser_version;
468+ self . get_config_mut ( ) . browser_version = browser_version;
472469 }
473470 }
474471
@@ -483,8 +480,7 @@ pub trait SeleniumManager {
483480
484481 fn set_driver_version ( & mut self , driver_version : String ) {
485482 if !driver_version. is_empty ( ) {
486- let mut config = self . get_config_mut ( ) ;
487- config. driver_version = driver_version;
483+ self . get_config_mut ( ) . driver_version = driver_version;
488484 }
489485 }
490486
@@ -510,8 +506,7 @@ pub trait SeleniumManager {
510506
511507 fn set_browser_path ( & mut self , browser_path : String ) {
512508 if !browser_path. is_empty ( ) {
513- let mut config = self . get_config_mut ( ) ;
514- config. browser_path = browser_path;
509+ self . get_config_mut ( ) . browser_path = browser_path;
515510 }
516511 }
517512
@@ -522,8 +517,7 @@ pub trait SeleniumManager {
522517 fn set_proxy ( & mut self , proxy : String ) -> Result < ( ) , Box < dyn Error > > {
523518 if !proxy. is_empty ( ) && !self . is_offline ( ) {
524519 self . get_logger ( ) . debug ( format ! ( "Using proxy: {}" , & proxy) ) ;
525- let mut config = self . get_config_mut ( ) ;
526- config. proxy = proxy;
520+ self . get_config_mut ( ) . proxy = proxy;
527521 self . update_http_client ( ) ?;
528522 }
529523 Ok ( ( ) )
@@ -535,8 +529,7 @@ pub trait SeleniumManager {
535529
536530 fn set_timeout ( & mut self , timeout : u64 ) -> Result < ( ) , Box < dyn Error > > {
537531 if timeout != REQUEST_TIMEOUT_SEC {
538- let mut config = self . get_config_mut ( ) ;
539- config. timeout = timeout;
532+ self . get_config_mut ( ) . timeout = timeout;
540533 self . get_logger ( )
541534 . debug ( format ! ( "Using timeout of {} seconds" , timeout) ) ;
542535 self . update_http_client ( ) ?;
0 commit comments