Skip to content

Commit c79991c

Browse files
committed
feat: Clone for ThreadSafeRepository
It is `Sync` and can easily be passed by reference, but sometimes it's nice to be cloning it as well.
1 parent 7df8cf3 commit c79991c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gix/src/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ pub struct Repository {
150150
///
151151
/// Note that this type purposefully isn't very useful until it is converted into a thread-local repository with `to_thread_local()`,
152152
/// it's merely meant to be able to exist in a `Sync` context.
153+
///
154+
/// Note that it can also cheaply be cloned, and it will retain references to all contained resources.
155+
#[derive(Clone)]
153156
pub struct ThreadSafeRepository {
154157
/// A store for references to point at objects
155158
pub refs: crate::RefStore,

0 commit comments

Comments
 (0)