Skip to content

Commit 13a30b6

Browse files
committed
Accept TryInto<RelativePath> in gix
1 parent daacaa5 commit 13a30b6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gix/src/reference/iter.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ impl Platform<'_> {
4545
/// These are of the form `refs/heads/` or `refs/remotes/origin`, and must not contain relative paths components like `.` or `..`.
4646
// TODO: Create a custom `Path` type that enforces the requirements of git naturally, this type is surprising possibly on windows
4747
// and when not using a trailing '/' to signal directories.
48-
pub fn prefixed<'a>(&self, prefix: &'a RelativePath) -> Result<Iter<'_>, init::Error> {
49-
Ok(Iter::new(self.repo, self.platform.prefixed(prefix)?))
48+
pub fn prefixed<'a>(
49+
&self,
50+
prefix: impl TryInto<&'a RelativePath, Error = gix_path::relative_path::Error>,
51+
) -> Result<Iter<'_>, init::Error> {
52+
Ok(Iter::new(self.repo, self.platform.prefixed(prefix.try_into()?)?))
5053
}
5154

5255
// TODO: tests

0 commit comments

Comments
 (0)