@@ -78,7 +78,7 @@ pub enum PlotOption<T>
7878 BoxWidth ( Vec < f64 > ) ,
7979}
8080
81- impl < ' l > OneWayOwned for PlotOption < & ' l str >
81+ impl OneWayOwned for PlotOption < & str >
8282{
8383 type Output = PlotOption < String > ;
8484 fn to_one_way_owned ( & self ) -> Self :: Output
@@ -258,7 +258,7 @@ pub enum LabelOption<T>
258258 MarkerSize ( f64 ) ,
259259}
260260
261- impl < ' l > OneWayOwned for LabelOption < & ' l str >
261+ impl OneWayOwned for LabelOption < & str >
262262{
263263 type Output = LabelOption < String > ;
264264 fn to_one_way_owned ( & self ) -> Self :: Output
@@ -295,7 +295,7 @@ pub enum TickOption<T>
295295 Format ( T ) ,
296296}
297297
298- impl < ' l > OneWayOwned for TickOption < & ' l str >
298+ impl OneWayOwned for TickOption < & str >
299299{
300300 type Output = TickOption < String > ;
301301 fn to_one_way_owned ( & self ) -> Self :: Output
@@ -376,7 +376,7 @@ pub enum LegendOption<T>
376376 MaxCols ( u32 ) ,
377377}
378378
379- impl < ' l > OneWayOwned for LegendOption < & ' l str >
379+ impl OneWayOwned for LegendOption < & str >
380380{
381381 type Output = LegendOption < String > ;
382382 fn to_one_way_owned ( & self ) -> Self :: Output
@@ -433,7 +433,7 @@ pub enum PaletteType<T>
433433 Custom ( T ) ,
434434}
435435
436- impl < ' l > OneWayOwned for PaletteType < & ' l [ ( f32 , f32 , f32 , f32 ) ] >
436+ impl OneWayOwned for PaletteType < & [ ( f32 , f32 , f32 , f32 ) ] >
437437{
438438 type Output = PaletteType < Vec < ( f32 , f32 , f32 , f32 ) > > ;
439439 fn to_one_way_owned ( & self ) -> Self :: Output
@@ -472,9 +472,9 @@ impl PaletteType<Vec<(f32, f32, f32, f32)>>
472472 }
473473 Formula ( r, g, b) =>
474474 {
475- assert ! ( r >= -36 && r <= 36 , "Invalid r formula!" ) ;
476- assert ! ( g >= -36 && g <= 36 , "Invalid g formula!" ) ;
477- assert ! ( b >= -36 && b <= 36 , "Invalid b formula!" ) ;
475+ assert ! ( ( -36 ..= 36 ) . contains ( & r ) , "Invalid r formula!" ) ;
476+ assert ! ( ( -36 ..= 36 ) . contains ( & g ) , "Invalid g formula!" ) ;
477+ assert ! ( ( -36 ..= 36 ) . contains ( & b ) , "Invalid b formula!" ) ;
478478 writeln ! ( w, "set palette rgbformulae {},{},{}" , r, g, b) ;
479479 }
480480 CubeHelix ( start, rev, sat, gamma) =>
0 commit comments