Commit 95b1f5d 1 parent 3b89507 commit 95b1f5d Copy full SHA for 95b1f5d
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ use gc_arena::barrier::unlock;
14
14
use gc_arena:: lock:: Lock ;
15
15
use gc_arena:: { Collect , Gc , Mutation } ;
16
16
use ruffle_macros:: istr;
17
- use std:: cell:: RefCell ;
17
+ use std:: cell:: Cell ;
18
18
use std:: slice:: Iter ;
19
19
use swf:: { Color , Rectangle , Twips } ;
20
20
21
21
#[ derive( Collect ) ]
22
22
#[ collect( no_drop) ]
23
23
pub struct FocusTrackerData < ' gc > {
24
24
focus : Lock < Option < InteractiveObject < ' gc > > > ,
25
- highlight : RefCell < Highlight > ,
25
+ highlight : Cell < Highlight > ,
26
26
}
27
27
28
28
#[ derive( Copy , Clone ) ]
@@ -64,17 +64,17 @@ impl<'gc> FocusTracker<'gc> {
64
64
mc,
65
65
FocusTrackerData {
66
66
focus : Lock :: new ( None ) ,
67
- highlight : RefCell :: new ( Highlight :: Inactive ) ,
67
+ highlight : Cell :: new ( Highlight :: Inactive ) ,
68
68
} ,
69
69
) )
70
70
}
71
71
72
72
pub fn highlight ( & self ) -> Highlight {
73
- * self . 0 . highlight . borrow ( )
73
+ self . 0 . highlight . get ( )
74
74
}
75
75
76
76
pub fn reset_highlight ( & self ) {
77
- self . 0 . highlight . replace ( Highlight :: Inactive ) ;
77
+ self . 0 . highlight . set ( Highlight :: Inactive ) ;
78
78
}
79
79
80
80
pub fn get ( & self ) -> Option < InteractiveObject < ' gc > > {
You can’t perform that action at this time.
0 commit comments