1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +02:00

termcolor: add ?Sized bound for &mut T impl

This commit is contained in:
Markus Westerlind 2018-02-20 13:13:37 +01:00 committed by Andrew Gallant
parent c78ab9e669
commit 597bf04a56

View File

@ -104,7 +104,7 @@ pub trait WriteColor: io::Write {
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 set_color(&mut self, spec: &ColorSpec) -> io::Result<()> {
(&mut **self).set_color(spec)