diff --git a/implot-examples/implot-glium-demo/src/main.rs b/implot-examples/implot-glium-demo/src/main.rs index e11a6c6..d6ce5db 100644 --- a/implot-examples/implot-glium-demo/src/main.rs +++ b/implot-examples/implot-glium-demo/src/main.rs @@ -1,4 +1,4 @@ -use examples_shared; + use imgui::{im_str, Condition, Window}; use implot::Context; diff --git a/implot-examples/implot-glium-demo/src/support/clipboard.rs b/implot-examples/implot-glium-demo/src/support/clipboard.rs index 7268798..3042482 100644 --- a/implot-examples/implot-glium-demo/src/support/clipboard.rs +++ b/implot-examples/implot-glium-demo/src/support/clipboard.rs @@ -11,7 +11,7 @@ pub struct ClipboardSupport(ClipboardContext); pub fn init() -> Option { ClipboardContext::new() .ok() - .map(|ctx| ClipboardSupport(ctx)) + .map(ClipboardSupport) } impl ClipboardBackend for ClipboardSupport { diff --git a/implot-examples/implot-wgpu-demo/src/main.rs b/implot-examples/implot-wgpu-demo/src/main.rs index e11a6c6..d6ce5db 100644 --- a/implot-examples/implot-wgpu-demo/src/main.rs +++ b/implot-examples/implot-wgpu-demo/src/main.rs @@ -1,4 +1,4 @@ -use examples_shared; + use imgui::{im_str, Condition, Window}; use implot::Context; diff --git a/src/plot_elements.rs b/src/plot_elements.rs index dca48be..80b26ce 100644 --- a/src/plot_elements.rs +++ b/src/plot_elements.rs @@ -286,7 +286,7 @@ impl PlotHeatmap { /// Specify the label format for hovered data points.. `None` means no label is shown. pub fn with_label_format(mut self, label_format: Option<&str>) -> Self { - self.label_format = label_format.and_then(|x| Some(im_str!("{}", x))); + self.label_format = label_format.map(|x| im_str!("{}", x)); self }