File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,18 @@ fn ui_builder() -> impl Widget<u32> { // `u32` is the application state
3535 LocalizedString :: new ( "hello-counter" )
3636 . with_arg (
3737 "count" ,
38- // Closure that will be run to fetch the counter value
39- | data : & u32 , _env |
40- ( * data) . into ( ) // We return the counter value in the application state
38+ // Closure that will fetch the counter value...
39+ | data : & u32 , _env | // Closure will receive the application state and environment
40+ ( * data) . into ( ) // We return the counter value in the application state
4141 ) ;
4242 // Create a label widget to display the text
4343 let label = Label :: new ( text) ;
4444 // Create a button widget to increment the counter
4545 let button = Button :: new (
4646 "increment" , // Text to be shown
47- // Closure that will be run when button is tapped
48- | _ctx, data, _env |
49- * data += 1 // We increment the counter
47+ // Closure that will be called when button is tapped...
48+ | _ctx, data, _env | // Closure will receive the context, application state and environment
49+ * data += 1 // We increment the counter
5050 ) ;
5151
5252 // Create a column for the UI
You can’t perform that action at this time.
0 commit comments