Skip to content

Commit

Permalink
Correct the lifetime of detached repo (#825)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn authored Mar 23, 2022
1 parent 86721d1 commit 5c41025
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 5c41025

Please sign in to comment.