Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gnuplot/src/datatype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl DataType for Duration
}
}

impl<'l> DataType for &'l Duration
impl DataType for &Duration
{
fn get(&self) -> f64
{
Expand Down
7 changes: 3 additions & 4 deletions gnuplot/src/figure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::io::{BufWriter, Write};
use std::path::{Path, PathBuf};
use std::process::{Child, Command, Stdio};
use std::str;
use tempfile;

enum AxesVariant
{
Expand Down Expand Up @@ -175,7 +174,7 @@ impl Figure
.as_ref()
.and_then(|d| d.path().to_str())
.map(|s| s.into()),
data_tempdir: data_tempdir,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you revert this one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be reverted now, added #([allow(...)] for the remaining clippy lints

data_tempdir,
}
}

Expand All @@ -194,7 +193,7 @@ impl Figure
if self
.data_directory
.as_ref()
.map(|s| s == "")
.map(|s| s.is_empty())
.unwrap_or(false)
{
self.data_directory = self
Expand Down Expand Up @@ -402,7 +401,7 @@ impl Figure

if let Ok(version_string) = str::from_utf8(&output.stdout)
{
let parts: Vec<_> = version_string.split(|c| c == ' ' || c == '.').collect();
let parts: Vec<_> = version_string.split([' ', '.']).collect();
if parts.len() > 2 && parts[0] == "gnuplot"
{
if let (Ok(major), Ok(minor)) =
Expand Down
16 changes: 8 additions & 8 deletions gnuplot/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub enum PlotOption<T>
BoxWidth(Vec<f64>),
}

impl<'l> OneWayOwned for PlotOption<&'l str>
impl OneWayOwned for PlotOption<&str>
{
type Output = PlotOption<String>;
fn to_one_way_owned(&self) -> Self::Output
Expand Down Expand Up @@ -258,7 +258,7 @@ pub enum LabelOption<T>
MarkerSize(f64),
}

impl<'l> OneWayOwned for LabelOption<&'l str>
impl OneWayOwned for LabelOption<&str>
{
type Output = LabelOption<String>;
fn to_one_way_owned(&self) -> Self::Output
Expand Down Expand Up @@ -295,7 +295,7 @@ pub enum TickOption<T>
Format(T),
}

impl<'l> OneWayOwned for TickOption<&'l str>
impl OneWayOwned for TickOption<&str>
{
type Output = TickOption<String>;
fn to_one_way_owned(&self) -> Self::Output
Expand Down Expand Up @@ -376,7 +376,7 @@ pub enum LegendOption<T>
MaxCols(u32),
}

impl<'l> OneWayOwned for LegendOption<&'l str>
impl OneWayOwned for LegendOption<&str>
{
type Output = LegendOption<String>;
fn to_one_way_owned(&self) -> Self::Output
Expand Down Expand Up @@ -433,7 +433,7 @@ pub enum PaletteType<T>
Custom(T),
}

impl<'l> OneWayOwned for PaletteType<&'l [(f32, f32, f32, f32)]>
impl OneWayOwned for PaletteType<&[(f32, f32, f32, f32)]>
{
type Output = PaletteType<Vec<(f32, f32, f32, f32)>>;
fn to_one_way_owned(&self) -> Self::Output
Expand Down Expand Up @@ -472,9 +472,9 @@ impl PaletteType<Vec<(f32, f32, f32, f32)>>
}
Formula(r, g, b) =>
{
assert!(r >= -36 && r <= 36, "Invalid r formula!");
assert!(g >= -36 && g <= 36, "Invalid g formula!");
assert!(b >= -36 && b <= 36, "Invalid b formula!");
assert!((-36..=36).contains(&r), "Invalid r formula!");
assert!((-36..=36).contains(&g), "Invalid g formula!");
assert!((-36..=36).contains(&b), "Invalid b formula!");
writeln!(w, "set palette rgbformulae {},{},{}", r, g, b);
}
CubeHelix(start, rev, sat, gamma) =>
Expand Down
2 changes: 1 addition & 1 deletion gnuplot/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ pub(crate) trait OneWayOwned
fn to_one_way_owned(&self) -> Self::Output;
}

impl<'l, T: OneWayOwned> OneWayOwned for &'l [T]
impl<T: OneWayOwned> OneWayOwned for &[T]
{
type Output = Vec<<T as OneWayOwned>::Output>;
fn to_one_way_owned(&self) -> Self::Output
Expand Down