From 84a6d6f2ab03c36e81c0ba5dc20976e7bdf78951 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 30 Nov 2023 17:53:34 +0100 Subject: [PATCH] Fix code example in `egui_demo_lib` --- crates/egui_demo_lib/src/demo/code_example.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui_demo_lib/src/demo/code_example.rs b/crates/egui_demo_lib/src/demo/code_example.rs index 7c97dacccba..7edb67020ae 100644 --- a/crates/egui_demo_lib/src/demo/code_example.rs +++ b/crates/egui_demo_lib/src/demo/code_example.rs @@ -37,7 +37,7 @@ impl CodeExample { show_code( ui, - r#"egui::Slider::new(&mut self.age, 0..=120).text("age")"#, + r#"ui.add(egui::Slider::new(&mut self.age, 0..=120).text("age"));"#, ); ui.add(egui::Slider::new(&mut self.age, 0..=120).text("age")); ui.end_row();