Skip to content

Commit b388d46

Browse files
committed
Repository: Add doc comment for open()
1 parent 910ac64 commit b388d46

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/git.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,18 @@ pub struct Repository {
143143
}
144144

145145
impl Repository {
146+
/// Clones the crate index from a remote git server and returns a
147+
/// `Repository` struct to interact with the local copy of the crate index.
148+
///
149+
/// Note that the `user` configuration for the repository is automatically
150+
/// set to `bors <bors@rust-lang.org>`.
151+
///
152+
/// # Errors
153+
///
154+
/// - If creation of a temporary folder for cloning the crate index fails.
155+
/// - If cloning the crate index fails.
156+
/// - If reading the global git config fails.
157+
///
146158
pub fn open(repository_config: &RepositoryConfig) -> Result<Self, PerformError> {
147159
let checkout_path = tempfile::Builder::new().prefix("git").tempdir()?;
148160

0 commit comments

Comments
 (0)