@@ -48,7 +48,7 @@ pub fn pydate_as_date(py_date: &Bound<'_, PyAny>) -> PyResult<Date> {
48
48
}
49
49
50
50
impl < ' py > EitherDate < ' py > {
51
- pub fn try_into_py ( & self , py : Python < ' py > , input : & ( impl Input < ' py > + ?Sized ) ) -> ValResult < PyObject > {
51
+ pub fn try_into_py ( self , py : Python < ' py > , input : & ( impl Input < ' py > + ?Sized ) ) -> ValResult < PyObject > {
52
52
match self {
53
53
Self :: Raw ( date) => {
54
54
if date. year == 0 {
@@ -63,7 +63,7 @@ impl<'py> EitherDate<'py> {
63
63
let py_date = PyDate :: new ( py, date. year . into ( ) , date. month , date. day ) ?;
64
64
Ok ( py_date. into ( ) )
65
65
}
66
- Self :: Py ( py_date) => Ok ( py_date. clone ( ) . into ( ) ) ,
66
+ Self :: Py ( py_date) => Ok ( py_date. into ( ) ) ,
67
67
}
68
68
}
69
69
@@ -285,7 +285,7 @@ pub fn pydatetime_as_datetime(py_dt: &Bound<'_, PyAny>) -> PyResult<DateTime> {
285
285
}
286
286
287
287
impl < ' py > EitherDateTime < ' py > {
288
- pub fn try_into_py ( & self , py : Python < ' py > , input : & ( impl Input < ' py > + ?Sized ) ) -> ValResult < PyObject > {
288
+ pub fn try_into_py ( self , py : Python < ' py > , input : & ( impl Input < ' py > + ?Sized ) ) -> ValResult < PyObject > {
289
289
match self {
290
290
Self :: Raw ( dt) => {
291
291
if dt. date . year == 0 {
@@ -310,7 +310,7 @@ impl<'py> EitherDateTime<'py> {
310
310
) ?;
311
311
Ok ( py_dt. into ( ) )
312
312
}
313
- Self :: Py ( py_dt) => Ok ( py_dt. clone ( ) . into ( ) ) ,
313
+ Self :: Py ( py_dt) => Ok ( py_dt. into ( ) ) ,
314
314
}
315
315
}
316
316
0 commit comments