Skip to content

Commit

Permalink
Update src/Library/demos/Toggle Button/code.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Hofer-Julian <[email protected]>
  • Loading branch information
onkarrai06 and Hofer-Julian authored Aug 30, 2023
1 parent fe7c164 commit 17edd40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Library/demos/Toggle Button/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ pub fn main() {
.cloned()
.collect();

for (id, name) in buttons.iter() {
let button: gtk::ToggleButton = workbench::builder().object(*id).unwrap();
for (id, name) in buttons.into_iter() {
let button: gtk::ToggleButton = workbench::builder().object(id).unwrap();
let cloned_name = name.to_string();
button.connect_active_notify(move |button| {
let status = if button.is_active() { "On" } else { "Off" };
Expand Down

0 comments on commit 17edd40

Please sign in to comment.