File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ impl Monitor {
3737
3838 #[ getter]
3939 pub fn position ( & self ) -> PyResult < ( i32 , i32 ) > {
40- let p = monitor_position ( self . entity )
41- . map_err ( |e| PyRuntimeError :: new_err ( format ! ( "{e}" ) ) ) ?;
40+ let p =
41+ monitor_position ( self . entity ) . map_err ( |e| PyRuntimeError :: new_err ( format ! ( "{e}" ) ) ) ?;
4242 Ok ( ( p. x , p. y ) )
4343 }
4444
4545 #[ getter]
4646 pub fn workarea ( & self ) -> PyResult < ( i32 , i32 , i32 , i32 ) > {
47- let r = monitor_workarea ( self . entity )
48- . map_err ( |e| PyRuntimeError :: new_err ( format ! ( "{e}" ) ) ) ?;
47+ let r =
48+ monitor_workarea ( self . entity ) . map_err ( |e| PyRuntimeError :: new_err ( format ! ( "{e}" ) ) ) ?;
4949 Ok ( ( r. min . x , r. min . y , r. width ( ) , r. height ( ) ) )
5050 }
5151}
Original file line number Diff line number Diff line change @@ -62,13 +62,13 @@ impl Surface {
6262
6363 #[ getter]
6464 pub fn position ( & self ) -> PyResult < ( i32 , i32 ) > {
65- let p = surface_position ( self . entity ) . map_err ( |e| PyRuntimeError :: new_err ( format ! ( "{e}" ) ) ) ?;
65+ let p =
66+ surface_position ( self . entity ) . map_err ( |e| PyRuntimeError :: new_err ( format ! ( "{e}" ) ) ) ?;
6667 Ok ( ( p. x , p. y ) )
6768 }
6869
6970 pub fn set_position ( & self , x : i32 , y : i32 ) -> PyResult < ( ) > {
70- surface_set_position ( self . entity , x, y)
71- . map_err ( |e| PyRuntimeError :: new_err ( format ! ( "{e}" ) ) )
71+ surface_set_position ( self . entity , x, y) . map_err ( |e| PyRuntimeError :: new_err ( format ! ( "{e}" ) ) )
7272 }
7373
7474 pub fn set_visible ( & self , visible : bool ) -> PyResult < ( ) > {
Original file line number Diff line number Diff line change @@ -572,7 +572,10 @@ pub fn monitor_workarea(
572572 Ok ( ( monitor, None ) ) => IRect :: from_corners (
573573 monitor. physical_position ,
574574 monitor. physical_position
575- + IVec2 :: new ( monitor. physical_width as i32 , monitor. physical_height as i32 ) ,
575+ + IVec2 :: new (
576+ monitor. physical_width as i32 ,
577+ monitor. physical_height as i32 ,
578+ ) ,
576579 ) ,
577580 Err ( _) => IRect :: from_corners ( IVec2 :: ZERO , IVec2 :: ZERO ) ,
578581 }
@@ -608,7 +611,10 @@ pub fn center_on_monitor(
608611 Ok ( ( monitor, None ) ) => IRect :: from_corners (
609612 monitor. physical_position ,
610613 monitor. physical_position
611- + IVec2 :: new ( monitor. physical_width as i32 , monitor. physical_height as i32 ) ,
614+ + IVec2 :: new (
615+ monitor. physical_width as i32 ,
616+ monitor. physical_height as i32 ,
617+ ) ,
612618 ) ,
613619 Err ( _) => return Ok ( ( ) ) ,
614620 } ;
You can’t perform that action at this time.
0 commit comments