@@ -36,8 +36,8 @@ pub struct DualCoordChartState<CT1: CoordTranslate, CT2: CoordTranslate> {
36
36
secondary : ChartState < CT2 > ,
37
37
}
38
38
39
- impl < ' a , DB : DrawingBackend , CT1 : CoordTranslate , CT2 : CoordTranslate >
40
- DualCoordChartContext < ' a , DB , CT1 , CT2 >
39
+ impl < DB : DrawingBackend , CT1 : CoordTranslate , CT2 : CoordTranslate >
40
+ DualCoordChartContext < ' _ , DB , CT1 , CT2 >
41
41
{
42
42
/// Convert the chart context into a chart state, similar to [ChartContext::into_chart_state](struct.ChartContext.html#method.into_chart_state)
43
43
pub fn into_chart_state ( self ) -> DualCoordChartState < CT1 , CT2 > {
@@ -54,16 +54,13 @@ impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate>
54
54
secondary : self . secondary . into_shared_chart_state ( ) ,
55
55
}
56
56
}
57
- }
58
57
59
- impl < ' a , DB : DrawingBackend , CT1 : CoordTranslate , CT2 : CoordTranslate >
60
- DualCoordChartContext < ' a , DB , CT1 , CT2 >
61
- where
62
- CT1 : Clone ,
63
- CT2 : Clone ,
64
- {
65
58
/// Copy the coordinate specs and make a chart state
66
- pub fn to_chart_state ( & self ) -> DualCoordChartState < CT1 , CT2 > {
59
+ pub fn to_chart_state ( & self ) -> DualCoordChartState < CT1 , CT2 >
60
+ where
61
+ CT1 : Clone ,
62
+ CT2 : Clone ,
63
+ {
67
64
DualCoordChartState {
68
65
primary : self . primary . to_chart_state ( ) ,
69
66
secondary : self . secondary . to_chart_state ( ) ,
@@ -73,10 +70,10 @@ where
73
70
74
71
impl < CT1 : CoordTranslate , CT2 : CoordTranslate > DualCoordChartState < CT1 , CT2 > {
75
72
/// Restore the chart state on the given drawing area
76
- pub fn restore < ' a , DB : DrawingBackend + ' a > (
73
+ pub fn restore < DB : DrawingBackend > (
77
74
self ,
78
75
area : & DrawingArea < DB , Shift > ,
79
- ) -> DualCoordChartContext < ' a , DB , CT1 , CT2 > {
76
+ ) -> DualCoordChartContext < ' _ , DB , CT1 , CT2 > {
80
77
let primary = self . primary . restore ( area) ;
81
78
let secondary = self
82
79
. secondary
@@ -85,18 +82,18 @@ impl<CT1: CoordTranslate, CT2: CoordTranslate> DualCoordChartState<CT1, CT2> {
85
82
}
86
83
}
87
84
88
- impl < ' a , DB : DrawingBackend , CT1 : CoordTranslate , CT2 : CoordTranslate >
89
- From < DualCoordChartContext < ' a , DB , CT1 , CT2 > > for DualCoordChartState < CT1 , CT2 >
85
+ impl < DB : DrawingBackend , CT1 : CoordTranslate , CT2 : CoordTranslate >
86
+ From < DualCoordChartContext < ' _ , DB , CT1 , CT2 > > for DualCoordChartState < CT1 , CT2 >
90
87
{
91
- fn from ( chart : DualCoordChartContext < ' a , DB , CT1 , CT2 > ) -> DualCoordChartState < CT1 , CT2 > {
88
+ fn from ( chart : DualCoordChartContext < ' _ , DB , CT1 , CT2 > ) -> DualCoordChartState < CT1 , CT2 > {
92
89
chart. into_chart_state ( )
93
90
}
94
91
}
95
92
96
- impl < ' a , ' b , DB : DrawingBackend , CT1 : CoordTranslate + Clone , CT2 : CoordTranslate + Clone >
97
- From < & ' b DualCoordChartContext < ' a , DB , CT1 , CT2 > > for DualCoordChartState < CT1 , CT2 >
93
+ impl < ' b , DB : DrawingBackend , CT1 : CoordTranslate + Clone , CT2 : CoordTranslate + Clone >
94
+ From < & ' b DualCoordChartContext < ' _ , DB , CT1 , CT2 > > for DualCoordChartState < CT1 , CT2 >
98
95
{
99
- fn from ( chart : & ' b DualCoordChartContext < ' a , DB , CT1 , CT2 > ) -> DualCoordChartState < CT1 , CT2 > {
96
+ fn from ( chart : & ' b DualCoordChartContext < ' _ , DB , CT1 , CT2 > ) -> DualCoordChartState < CT1 , CT2 > {
100
97
chart. to_chart_state ( )
101
98
}
102
99
}
@@ -139,8 +136,8 @@ impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate>
139
136
}
140
137
}
141
138
142
- impl < ' a , DB : DrawingBackend , CT1 : CoordTranslate , CT2 : ReverseCoordTranslate >
143
- DualCoordChartContext < ' a , DB , CT1 , CT2 >
139
+ impl < DB : DrawingBackend , CT1 : CoordTranslate , CT2 : ReverseCoordTranslate >
140
+ DualCoordChartContext < ' _ , DB , CT1 , CT2 >
144
141
{
145
142
/// Convert the chart context into the secondary coordinate translation function
146
143
pub fn into_secondary_coord_trans ( self ) -> impl Fn ( BackendCoord ) -> Option < CT2 :: From > {
@@ -149,8 +146,8 @@ impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: ReverseCoordTranslate>
149
146
}
150
147
}
151
148
152
- impl < ' a , DB : DrawingBackend , CT1 : ReverseCoordTranslate , CT2 : ReverseCoordTranslate >
153
- DualCoordChartContext < ' a , DB , CT1 , CT2 >
149
+ impl < DB : DrawingBackend , CT1 : ReverseCoordTranslate , CT2 : ReverseCoordTranslate >
150
+ DualCoordChartContext < ' _ , DB , CT1 , CT2 >
154
151
{
155
152
/// Convert the chart context into a pair of closures that maps the pixel coordinate into the
156
153
/// logical coordinate for both primary coordinate system and secondary coordinate system.
0 commit comments