Skip to content

Commit c9a60b2

Browse files
committed
Re-introduce clone_ref but deprecate it.
1 parent adcf654 commit c9a60b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,12 @@ impl TaskLocals {
514514
pub fn context<'p>(&self, py: Python<'p>) -> Bound<'p, PyAny> {
515515
self.context.clone_ref(py).into_bound(py)
516516
}
517+
518+
/// Create a clone of the TaskLocals. No longer uses the runtime, use `clone` instead.
519+
#[deprecated(note = "please use `clone` instead")]
520+
pub fn clone_ref(&self, _py: Python<'_>) -> Self {
521+
self.clone()
522+
}
517523
}
518524

519525
impl Clone for TaskLocals {

0 commit comments

Comments
 (0)