Skip to content

Commit 5383afc

Browse files
authored
impl Send for TreeUpdateBuilder (#784)
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.
1 parent 2c67635 commit 5383afc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,8 @@ extern "C" fn notify_cb(
680680
.unwrap_or(2)
681681
}
682682

683+
unsafe impl Send for TreeUpdateBuilder {}
684+
683685
impl Default for TreeUpdateBuilder {
684686
fn default() -> Self {
685687
Self::new()

0 commit comments

Comments
 (0)