@@ -18,7 +18,7 @@ use libremarkable::stopwatch;
1818use atomic:: Atomic ;
1919use chrono:: { DateTime , Local } ;
2020use log:: info;
21- use once_cell :: sync:: Lazy ;
21+ use std :: sync:: LazyLock ;
2222
2323use std:: collections:: VecDeque ;
2424use std:: fmt;
@@ -100,16 +100,16 @@ const CANVAS_REGION: mxcfb_rect = mxcfb_rect {
100100
101101type PointAndPressure = ( cgmath:: Point2 < f32 > , i32 ) ;
102102
103- static G_TOUCH_MODE : Lazy < Atomic < TouchMode > > = Lazy :: new ( || Atomic :: new ( TouchMode :: OnlyUI ) ) ;
104- static G_DRAW_MODE : Lazy < Atomic < DrawMode > > = Lazy :: new ( || Atomic :: new ( DrawMode :: Draw ( 2 ) ) ) ;
105- static UNPRESS_OBSERVED : Lazy < AtomicBool > = Lazy :: new ( || AtomicBool :: new ( false ) ) ;
106- static WACOM_IN_RANGE : Lazy < AtomicBool > = Lazy :: new ( || AtomicBool :: new ( false ) ) ;
107- static WACOM_RUBBER_SIDE : Lazy < AtomicBool > = Lazy :: new ( || AtomicBool :: new ( false ) ) ;
108- static WACOM_HISTORY : Lazy < Mutex < VecDeque < PointAndPressure > > > =
109- Lazy :: new ( || Mutex :: new ( VecDeque :: new ( ) ) ) ;
110- static G_COUNTER : Lazy < Mutex < u32 > > = Lazy :: new ( || Mutex :: new ( 0 ) ) ;
111- static SAVED_CANVAS : Lazy < Mutex < Option < storage:: CompressedCanvasState > > > =
112- Lazy :: new ( || Mutex :: new ( None ) ) ;
103+ static G_TOUCH_MODE : LazyLock < Atomic < TouchMode > > = LazyLock :: new ( || Atomic :: new ( TouchMode :: OnlyUI ) ) ;
104+ static G_DRAW_MODE : LazyLock < Atomic < DrawMode > > = LazyLock :: new ( || Atomic :: new ( DrawMode :: Draw ( 2 ) ) ) ;
105+ static UNPRESS_OBSERVED : LazyLock < AtomicBool > = LazyLock :: new ( || AtomicBool :: new ( false ) ) ;
106+ static WACOM_IN_RANGE : LazyLock < AtomicBool > = LazyLock :: new ( || AtomicBool :: new ( false ) ) ;
107+ static WACOM_RUBBER_SIDE : LazyLock < AtomicBool > = LazyLock :: new ( || AtomicBool :: new ( false ) ) ;
108+ static WACOM_HISTORY : LazyLock < Mutex < VecDeque < PointAndPressure > > > =
109+ LazyLock :: new ( || Mutex :: new ( VecDeque :: new ( ) ) ) ;
110+ static G_COUNTER : LazyLock < Mutex < u32 > > = LazyLock :: new ( || Mutex :: new ( 0 ) ) ;
111+ static SAVED_CANVAS : LazyLock < Mutex < Option < storage:: CompressedCanvasState > > > =
112+ LazyLock :: new ( || Mutex :: new ( None ) ) ;
113113
114114// ####################
115115// ## Button Handlers
0 commit comments