Skip to content

Commit d2fe1d7

Browse files
author
Thomas Bahn
committed
Refactor for rust 1.6.0 compatibility
When we decide to raise to lowest supported compiler version this commit can be reverted.
1 parent 12bcd7f commit d2fe1d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ascii_str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ pub trait AsMutAsciiStr {
577577
}
578578

579579
// These generic implementations mirror the generic implementations for AsRef<T> in core.
580-
impl<'a, T> AsAsciiStr for &'a T where T: AsAsciiStr + ?Sized {
580+
impl<'a, T: ?Sized> AsAsciiStr for &'a T where T: AsAsciiStr {
581581
#[inline]
582582
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError> {
583583
<T as AsAsciiStr>::as_ascii_str(*self)
@@ -589,7 +589,7 @@ impl<'a, T> AsAsciiStr for &'a T where T: AsAsciiStr + ?Sized {
589589
}
590590
}
591591

592-
impl<'a, T> AsAsciiStr for &'a mut T where T: AsAsciiStr + ?Sized {
592+
impl<'a, T: ?Sized> AsAsciiStr for &'a mut T where T: AsAsciiStr {
593593
#[inline]
594594
fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError> {
595595
<T as AsAsciiStr>::as_ascii_str(*self)
@@ -601,7 +601,7 @@ impl<'a, T> AsAsciiStr for &'a mut T where T: AsAsciiStr + ?Sized {
601601
}
602602
}
603603

604-
impl<'a, T> AsMutAsciiStr for &'a mut T where T: AsMutAsciiStr + ?Sized {
604+
impl<'a, T: ?Sized> AsMutAsciiStr for &'a mut T where T: AsMutAsciiStr {
605605
#[inline]
606606
fn as_mut_ascii_str(&mut self) -> Result<&mut AsciiStr, AsAsciiStrError> {
607607
<T as AsMutAsciiStr>::as_mut_ascii_str(*self)

0 commit comments

Comments
 (0)