@@ -29,8 +29,8 @@ macro_rules! check_recursion {
29
29
to the same widget.\n Inspect the stack trace to determine which call it is.\n Then you can either \
30
30
refactor your code to avoid a cyclic event dependency or block events from being emitted by doing \
31
31
the following:\n {\n let _lock = self.model.relm.stream().lock();\n // Your panicking call.\n }\
32
- \n See this example:\
33
- https://github.com/antoyo/relm/blob/feature/futures-glib/examples/checkboxes.rs#L88\n
32
+ \n See this example: \
33
+ https://github.com/antoyo/relm/blob/feature/futures-glib/examples/checkboxes.rs#L88\
34
34
This issue can also happen when emitting a signal to the same widget, in which case you need to\
35
35
refactor your code to avoid this cyclic event dependency.") ;
36
36
}
@@ -60,7 +60,7 @@ macro_rules! connect {
60
60
( $widget: expr, $event: ident( $( $args: pat) ,* ) , $other_component: expr, $msg: expr) => {
61
61
let stream = $other_component. stream( ) . clone( ) ;
62
62
$widget. $event( move |$( $args) ,* | {
63
- let msg: Option <_> = $msg. into ( ) ;
63
+ let msg: Option <_> = :: relm :: IntoOption :: into_option ( $msg) ;
64
64
if let Some ( msg) = msg {
65
65
stream. emit( msg) ;
66
66
}
@@ -75,7 +75,7 @@ macro_rules! connect {
75
75
let stream = $relm. stream( ) . clone( ) ;
76
76
$widget. $event( move |$( $args) ,* | {
77
77
let ( msg, return_value) = $msg;
78
- let msg: Option <_> = msg . into ( ) ;
78
+ let msg: Option <_> = :: relm :: IntoOption :: into_option ( msg ) ;
79
79
if let Some ( msg) = msg {
80
80
stream. emit( msg) ;
81
81
}
@@ -97,7 +97,7 @@ macro_rules! connect {
97
97
check_recursion!( $widget_clone) ;
98
98
let mut $widget_clone = $widget_clone. borrow_mut( ) ;
99
99
let ( msg, return_value) = $msg;
100
- let msg: Option <_> = msg . into ( ) ;
100
+ let msg: Option <_> = :: relm :: IntoOption :: into_option ( msg ) ;
101
101
if let Some ( msg) = msg {
102
102
stream. emit( msg) ;
103
103
}
@@ -117,7 +117,7 @@ macro_rules! connect {
117
117
let $widget_clone = $widget_clone. upgrade( ) . expect( "upgrade should always work" ) ;
118
118
check_recursion!( $widget_clone) ;
119
119
let mut $widget_clone = $widget_clone. borrow_mut( ) ;
120
- let msg: Option <_> = $msg. into ( ) ;
120
+ let msg: Option <_> = :: relm :: IntoOption :: into_option ( $msg) ;
121
121
if let Some ( msg) = msg {
122
122
stream. emit( msg) ;
123
123
}
@@ -136,7 +136,7 @@ macro_rules! connect {
136
136
let $widget = $widget. upgrade( ) . expect( "upgrade should always work" ) ;
137
137
check_recursion!( $widget) ;
138
138
let mut $widget = $widget. borrow_mut( ) ;
139
- let msg: Option <_> = $msg. into ( ) ;
139
+ let msg: Option <_> = :: relm :: IntoOption :: into_option ( $msg) ;
140
140
if let Some ( msg) = msg {
141
141
stream. emit( msg) ;
142
142
}
@@ -150,7 +150,7 @@ macro_rules! connect {
150
150
( $relm: expr, $widget: expr, $event: ident( $( $args: pat) ,* ) , $msg: expr) => { {
151
151
let stream = $relm. stream( ) . clone( ) ;
152
152
$widget. $event( move |$( $args) ,* | {
153
- let msg: Option <_> = $msg. into ( ) ;
153
+ let msg: Option <_> = :: relm :: IntoOption :: into_option ( $msg) ;
154
154
if let Some ( msg) = msg {
155
155
stream. emit( msg) ;
156
156
}
@@ -165,7 +165,7 @@ macro_rules! connect {
165
165
#[ allow( unreachable_patterns) ]
166
166
match msg {
167
167
$message => {
168
- let msg: Option <_> = $msg. into ( ) ;
168
+ let msg: Option <_> = :: relm :: IntoOption :: into_option ( $msg) ;
169
169
if let Some ( msg) = msg {
170
170
stream. emit( msg) ;
171
171
}
0 commit comments