Skip to content

Commit 0bff633

Browse files
author
Antonio-Miguel Corbi Bellot
authored
The second example dose not compile for me.
Correcting a minor typo and adding WidgetExt to the 'use' line solves the compilation problems.
1 parent 60a1687 commit 0bff633

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_posts/2018-05-01-who-talked-about-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ extern crate gtk;
5353
#[macro_use]
5454
extern crate gtk_test;
5555

56-
use gtk::{Button, ButtonExt, ContainerExt, GtkWindowExt, Window, WindowType};
56+
use gtk::{Button, ButtonExt, ContainerExt, GtkWindowExt, Window, WindowType, WidgetExt};
5757

5858
fn main() {
5959
gtk::init().expect("GTK init failed");
6060

6161
let window = Window::new(WindowType::Toplevel);
6262
let but = Button::new();
6363
but.set_label("button");
64-
let observer = observer_new!(button, connect_clicked, |b| {
64+
let observer = observer_new!(but, connect_clicked, |b| {
6565
b.set_label("clicked!");
6666
});
6767
window.add(&but);

0 commit comments

Comments
 (0)