Skip to content

Commit 5c41025

Browse files
authored
Correct the lifetime of detached repo (rust-lang#825)
1 parent 86721d1 commit 5c41025

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/remote.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'repo> Remote<'repo> {
101101
/// when you have a URL instead of a remote's name.
102102
/// Contrasted with an anonymous remote, a detached remote will not
103103
/// consider any repo configuration values.
104-
pub fn create_detached(url: &str) -> Result<Remote<'_>, Error> {
104+
pub fn create_detached<S: Into<Vec<u8>>>(url: S) -> Result<Remote<'repo>, Error> {
105105
crate::init();
106106
let mut ret = ptr::null_mut();
107107
let url = CString::new(url)?;

0 commit comments

Comments
 (0)