From 682fadeb1cfe90ad72ad232a966440ab5fa81852 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Sun, 19 Aug 2018 08:38:33 -0700 Subject: [PATCH] Fix `pop_layer` button in tutorial_3.md --- doc/tutorial_3.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/tutorial_3.md b/doc/tutorial_3.md index ab51a25..0a0213f 100644 --- a/doc/tutorial_3.md +++ b/doc/tutorial_3.md @@ -58,7 +58,9 @@ fn add_name(s: &mut Cursive) { }).unwrap(); ok(s, &name); }) - .button("Cancel", |s| s.pop_layer())); + .button("Cancel", |s| { + s.pop_layer(); + })); } fn delete_name(s: &mut Cursive) { @@ -206,7 +208,9 @@ fn add_name(s: &mut Cursive) { .button("Ok", |s| { // What do we do now?... }) - .button("Cancel", |s| s.pop_layer())); + .button("Cancel", |s| { + s.pop_layer(); + })); } ``` @@ -243,7 +247,9 @@ fn add_name(s: &mut Cursive) { view.get_content() }).unwrap(); }) - .button("Cancel", |s| s.pop_layer())); + .button("Cancel", |s| + s.pop_layer(); + })); } ``` @@ -284,7 +290,9 @@ fn add_name(s: &mut Cursive) { }).unwrap(); ok(s, &name); }) - .button("Cancel", |s| s.pop_layer())); + .button("Cancel", |s| { + s.pop_layer(); + })); } ```