Is it not possible to just take a `fn` type? It forces a non-capturing fn.
On 10/8/19 7:16 PM, Yuya Nishihara wrote:
+ pub fn map<U>( + mut self, + py: Python, + f: impl FnOnce(T) -> U, + ) -> PyLeakedRef<U> { + PyLeakedRef { + inner: self.inner.clone_ref(py), + data: Some(f(self.data.take().unwrap())), + py_shared_state: self.py_shared_state, + } + }
_______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel