зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #20481 - style: Derive a debug impl instead of implementing by hand (from emilio:debug-wat); r=nox
Source-Repo: https://github.com/servo/servo Source-Revision: 39018f933997e266e11968d82f556af15c5321d8 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 9ca7de120848377507ed4048882b6c6835412fdd
This commit is contained in:
Родитель
3e22c51351
Коммит
a10ac63454
|
@ -120,7 +120,7 @@ pub enum GradientItem<Color, LengthOrPercentage> {
|
|||
|
||||
/// A color stop.
|
||||
/// <https://drafts.csswg.org/css-images/#typedef-color-stop-list>
|
||||
#[derive(Clone, Copy, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
pub struct ColorStop<Color, LengthOrPercentage> {
|
||||
/// The color of this stop.
|
||||
pub color: Color,
|
||||
|
@ -310,15 +310,3 @@ where
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<C, L> fmt::Debug for ColorStop<C, L>
|
||||
where C: fmt::Debug, L: fmt::Debug,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{:?}", self.color)?;
|
||||
if let Some(ref pos) = self.position {
|
||||
write!(f, " {:?}", pos)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче