From 8c628bccd6a8c2dc19c764369a065627b4fc2467 Mon Sep 17 00:00:00 2001 From: Jefta Date: Mon, 24 May 2021 14:09:27 +0200 Subject: [PATCH] Make book example compile This example code doesn't work since it calls `build_ui` rather than passing it directly. Removing the parentheses fixes the problem. Note that this is my first interaction with druid, so my fix may not be idiomatic? Would love to hear of a better solution if that's the case. --- docs/src/get_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/get_started.md b/docs/src/get_started.md index 75c1fdde20..36b4f30727 100644 --- a/docs/src/get_started.md +++ b/docs/src/get_started.md @@ -26,7 +26,7 @@ fn build_ui() -> impl Widget<()> { } fn main() -> Result<(), PlatformError> { - AppLauncher::with_window(WindowDesc::new(build_ui())).launch(())?; + AppLauncher::with_window(WindowDesc::new(build_ui)).launch(())?; Ok(()) } ```