Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the lifetime of detached repo #825

Merged
merged 1 commit into from
Mar 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<'repo> Remote<'repo> {
/// when you have a URL instead of a remote's name.
/// Contrasted with an anonymous remote, a detached remote will not
/// consider any repo configuration values.
pub fn create_detached(url: &str) -> Result<Remote<'_>, Error> {
pub fn create_detached<S: Into<Vec<u8>>>(url: S) -> Result<Remote<'repo>, Error> {
crate::init();
let mut ret = ptr::null_mut();
let url = CString::new(url)?;
Expand Down