Skip to content

Commit 7dc7403

Browse files
committed
Remove AsRef<Path<T>> for Cow<[u8]> and AsRef<Utf8Path<T>> for Cow<str> as they conflict with other libraries
1 parent 6b1bcfd commit 7dc7403

2 files changed

Lines changed: 0 additions & 26 deletions

File tree

src/common/non_utf8/path.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,16 +1055,6 @@ where
10551055
}
10561056
}
10571057

1058-
impl<T> AsRef<Path<T>> for Cow<'_, [u8]>
1059-
where
1060-
T: Encoding,
1061-
{
1062-
#[inline]
1063-
fn as_ref(&self) -> &Path<T> {
1064-
Path::new(self)
1065-
}
1066-
}
1067-
10681058
impl<T> AsRef<Path<T>> for Vec<u8>
10691059
where
10701060
T: Encoding,
@@ -1433,14 +1423,11 @@ macro_rules! impl_cmp_bytes {
14331423

14341424
impl_cmp_bytes!(; PathBuf<T>, [u8]);
14351425
impl_cmp_bytes!('a; PathBuf<T>, &'a [u8]);
1436-
impl_cmp_bytes!('a; PathBuf<T>, Cow<'a, [u8]>);
14371426
impl_cmp_bytes!(; PathBuf<T>, Vec<u8>);
14381427
impl_cmp_bytes!(; Path<T>, [u8]);
14391428
impl_cmp_bytes!('a; Path<T>, &'a [u8]);
1440-
impl_cmp_bytes!('a; Path<T>, Cow<'a, [u8]>);
14411429
impl_cmp_bytes!(; Path<T>, Vec<u8>);
14421430
impl_cmp_bytes!('a; &'a Path<T>, [u8]);
1443-
impl_cmp_bytes!('a, 'b; &'a Path<T>, Cow<'b, [u8]>);
14441431
impl_cmp_bytes!('a; &'a Path<T>, Vec<u8>);
14451432

14461433
mod helpers {

src/common/utf8/path.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,16 +1067,6 @@ where
10671067
}
10681068
}
10691069

1070-
impl<T> AsRef<Utf8Path<T>> for Cow<'_, str>
1071-
where
1072-
T: Utf8Encoding,
1073-
{
1074-
#[inline]
1075-
fn as_ref(&self) -> &Utf8Path<T> {
1076-
Utf8Path::new(self)
1077-
}
1078-
}
1079-
10801070
impl<T> AsRef<Utf8Path<T>> for String
10811071
where
10821072
T: Utf8Encoding,
@@ -1419,14 +1409,11 @@ macro_rules! impl_cmp_bytes {
14191409

14201410
impl_cmp_bytes!(; Utf8PathBuf<T>, str);
14211411
impl_cmp_bytes!('a; Utf8PathBuf<T>, &'a str);
1422-
impl_cmp_bytes!('a; Utf8PathBuf<T>, Cow<'a, str>);
14231412
impl_cmp_bytes!(; Utf8PathBuf<T>, String);
14241413
impl_cmp_bytes!(; Utf8Path<T>, str);
14251414
impl_cmp_bytes!('a; Utf8Path<T>, &'a str);
1426-
impl_cmp_bytes!('a; Utf8Path<T>, Cow<'a, str>);
14271415
impl_cmp_bytes!(; Utf8Path<T>, String);
14281416
impl_cmp_bytes!('a; &'a Utf8Path<T>, str);
1429-
impl_cmp_bytes!('a, 'b; &'a Utf8Path<T>, Cow<'b, str>);
14301417
impl_cmp_bytes!('a; &'a Utf8Path<T>, String);
14311418

14321419
mod helpers {

0 commit comments

Comments
 (0)