diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index af6d416a20d..94cc1706c4a 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -312,26 +312,6 @@ impl ToComputedValue for Box<[T]> } } -/// A marker trait to represent that the specified value is also the computed -/// value. -pub trait ComputedValueAsSpecified {} - -impl ToComputedValue for T - where T: ComputedValueAsSpecified + Clone, -{ - type ComputedValue = T; - - #[inline] - fn to_computed_value(&self, _context: &Context) -> T { - self.clone() - } - - #[inline] - fn from_computed_value(computed: &T) -> Self { - computed.clone() - } -} - trivial_to_computed_value!(()); trivial_to_computed_value!(bool); trivial_to_computed_value!(f32); diff --git a/components/style/values/generics/image.rs b/components/style/values/generics/image.rs index 874511330d4..a0b2cb1b281 100644 --- a/components/style/values/generics/image.rs +++ b/components/style/values/generics/image.rs @@ -34,11 +34,7 @@ pub enum Image { PaintWorklet(PaintWorklet), } -// Can't just use derive(ToComputedValue) on Image, because when trying to do -// "impl ToComputedValue for Box" the Rust compiler complains that -// "impl ToComputedValue for T where T: ComputedValueAsSpecified + Clone" -// aleady implements ToComputedValue for std::boxed::Box<_> and hence we have -// conflicting implementations. +// FIXME(nox): Implement TCV for Box and derive this. impl ToComputedValue for Image {