apply some automatic clippy hints

This commit is contained in:
Benedikt Mandelkow 2020-11-23 00:35:44 +01:00 committed by 4bb4
parent c5ec153488
commit d02f25fb32
4 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
use examples_shared;
use imgui::{im_str, Condition, Window}; use imgui::{im_str, Condition, Window};
use implot::Context; use implot::Context;

View file

@ -11,7 +11,7 @@ pub struct ClipboardSupport(ClipboardContext);
pub fn init() -> Option<ClipboardSupport> { pub fn init() -> Option<ClipboardSupport> {
ClipboardContext::new() ClipboardContext::new()
.ok() .ok()
.map(|ctx| ClipboardSupport(ctx)) .map(ClipboardSupport)
} }
impl ClipboardBackend for ClipboardSupport { impl ClipboardBackend for ClipboardSupport {

View file

@ -1,4 +1,4 @@
use examples_shared;
use imgui::{im_str, Condition, Window}; use imgui::{im_str, Condition, Window};
use implot::Context; use implot::Context;

View file

@ -286,7 +286,7 @@ impl PlotHeatmap {
/// Specify the label format for hovered data points.. `None` means no label is shown. /// 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 { 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 self
} }