From cb3d9a12929a9d886497c9f0aa15f497763d98c9 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 30 Nov 2021 19:38:30 -0800 Subject: [PATCH] impl Send for TreeUpdateBuilder TreeUpdateBuilder does not have any interior mutability, and the underlying libgit2 data structures are safe to send to a different thread as long as the old doesn't have a copy anymore. --- src/build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/build.rs b/src/build.rs index fd17848346..72e40ced5c 100644 --- a/src/build.rs +++ b/src/build.rs @@ -680,6 +680,8 @@ extern "C" fn notify_cb( .unwrap_or(2) } +unsafe impl Send for TreeUpdateBuilder {} + impl Default for TreeUpdateBuilder { fn default() -> Self { Self::new()