Skip to content

Commit dac9962

Browse files
committed
Add comment on when to use new methods
1 parent 201cdd1 commit dac9962

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gix/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ pub fn discover(directory: impl AsRef<std::path::Path>) -> Result<Repository, di
223223
}
224224

225225
/// See [`ThreadSafeRepository::discover_with_environment_overrides()`], but returns a [`Repository`] instead.
226+
///
227+
/// Use this method if you want a [`Repository`], but don't require it to be `Sync`.
226228
#[allow(clippy::result_large_err)]
227229
pub fn discover_with_environment_overrides(
228230
directory: impl AsRef<std::path::Path>,
@@ -231,6 +233,8 @@ pub fn discover_with_environment_overrides(
231233
}
232234

233235
/// See [`ThreadSafeRepository::open_with_environment_overrides()`], but returns a [`Repository`] instead.
236+
///
237+
/// Use this method if you want a [`Repository`], but don't require it to be `Sync`.
234238
#[allow(clippy::result_large_err)]
235239
pub fn open_with_environment_overrides(directory: impl Into<std::path::PathBuf>) -> Result<Repository, open::Error> {
236240
ThreadSafeRepository::open_with_environment_overrides(directory, Default::default()).map(Into::into)

0 commit comments

Comments
 (0)