File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -685,6 +685,7 @@ fn closure() {
685
685
686
686
let inc_by = {
687
687
let obj = glib:: Object :: new :: < SendObject > ( ) ;
688
+ let obj = obj. imp ( ) . obj ( ) ;
688
689
let inc_by = glib:: closure!( @watch obj => move |x: i32 | {
689
690
let old = obj. value( ) ;
690
691
obj. set_value( x + old) ;
Original file line number Diff line number Diff line change @@ -3117,6 +3117,16 @@ impl<T: ObjectType> Watchable<T> for T {
3117
3117
}
3118
3118
}
3119
3119
3120
+ #[ doc( hidden) ]
3121
+ impl < ' a , T : ObjectType > Watchable < T > for BorrowedObject < ' a , T > {
3122
+ fn watched_object ( & self ) -> WatchedObject < T > {
3123
+ WatchedObject :: new ( self )
3124
+ }
3125
+ fn watch_closure ( & self , closure : & impl AsRef < Closure > ) {
3126
+ ObjectExt :: watch_closure ( & * * self , closure)
3127
+ }
3128
+ }
3129
+
3120
3130
#[ doc( hidden) ]
3121
3131
impl < T : ObjectType > Watchable < T > for & T {
3122
3132
fn watched_object ( & self ) -> WatchedObject < T > {
You can’t perform that action at this time.
0 commit comments