History

Apply `momo` to mod `gix::open::repository`

to: - `ThreadSafeRepository::open_opts` - `ThreadSafeRepository::open_with_environment_overrides`

Jiahao XU committed 3 years ago

Commit 3ce01441 parent d8355261 file · +4 −0Browse files

Unified · Split

gix/src/open/repository.rs+4−0
@@ -2,6 +2,7 @@ · 1 unmodified line
22 use std::{borrow::Cow, path::PathBuf};
33
44 use gix_features::threading::OwnShared;
5+use gix_macros::momo;
56
67 use super::{Error, Options};
78 use crate::{
@@ -58,6 +59,8 @@ impl ThreadSafeRepository { · 50 unmodified lines
5859 ///
5960 /// Note that opening a repository for implementing custom hooks is also handle specifically in
6061 /// [`open_with_environment_overrides()`][Self::open_with_environment_overrides()].
62+ #[momo]
63+ #[allow(unused_mut)]
6164 pub fn open_opts(path: impl Into<PathBuf>, mut options: Options) -> Result<Self, Error> {
6265 let _span = gix_trace::coarse!("ThreadSafeRepository::open()");
6366 let (path, kind) = {
@@ -109,6 +112,7 @@ impl ThreadSafeRepository { · 45 unmodified lines
109112 // GIT_PROXY_SSL_CERT, GIT_PROXY_SSL_KEY, GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED.
110113 // GIT_PROXY_SSL_CAINFO, GIT_SSL_CIPHER_LIST, GIT_HTTP_MAX_REQUESTS, GIT_CURL_FTP_NO_EPSV,
111114 #[doc(alias = "open_from_env", alias = "git2")]
115+ #[momo]
112116 pub fn open_with_environment_overrides(
113117 fallback_directory: impl Into<PathBuf>,
114118 trust_map: gix_sec::trust::Mapping<Options>,