mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-01-19 05:49:14 +02:00
termcolor: add ?Sized bound for &mut T impl
This commit is contained in:
parent
c78ab9e669
commit
597bf04a56
@ -104,7 +104,7 @@ pub trait WriteColor: io::Write {
|
|||||||
fn reset(&mut self) -> io::Result<()>;
|
fn reset(&mut self) -> io::Result<()>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T: WriteColor> WriteColor for &'a mut T {
|
impl<'a, T: ?Sized + WriteColor> WriteColor for &'a mut T {
|
||||||
fn supports_color(&self) -> bool { (&**self).supports_color() }
|
fn supports_color(&self) -> bool { (&**self).supports_color() }
|
||||||
fn set_color(&mut self, spec: &ColorSpec) -> io::Result<()> {
|
fn set_color(&mut self, spec: &ColorSpec) -> io::Result<()> {
|
||||||
(&mut **self).set_color(spec)
|
(&mut **self).set_color(spec)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user