From 597bf04a56d43aa9c0eb0f8fbb90c9d51c53656c Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Tue, 20 Feb 2018 13:13:37 +0100 Subject: [PATCH] termcolor: add ?Sized bound for &mut T impl --- termcolor/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termcolor/src/lib.rs b/termcolor/src/lib.rs index 7b90851a..81825898 100644 --- a/termcolor/src/lib.rs +++ b/termcolor/src/lib.rs @@ -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)