mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove #[compute(clone)]
This commit is contained in:
parent
92068ca540
commit
2efd06c12d
6 changed files with 7 additions and 27 deletions
|
@ -293,8 +293,7 @@ impl<'a, 'cx, 'cx_a: 'cx, S: ToComputedValue + 'a> Iterator for ComputedVecIter<
|
|||
///
|
||||
/// This trait is derivable with `#[derive(ToComputedValue)]`. The derived
|
||||
/// implementation just calls `ToComputedValue::to_computed_value` on each field
|
||||
/// of the passed value, or `Clone::clone` if the field is annotated with
|
||||
/// `#[compute(clone)]`. The deriving code assumes that if the type isn't
|
||||
/// of the passed value. The deriving code assumes that if the type isn't
|
||||
/// generic, then the trait can be implemented as simple `Clone::clone` calls,
|
||||
/// this means that a manual implementation with `ComputedValue = Self` is bogus
|
||||
/// if it returns anything else than a clone.
|
||||
|
|
|
@ -11,7 +11,7 @@ use values::{CSSFloat, serialize_percentage};
|
|||
/// A computed percentage.
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, Default, MallocSizeOf)]
|
||||
#[derive(PartialEq, PartialOrd, ToAnimatedZero)]
|
||||
#[derive(PartialEq, PartialOrd, ToAnimatedZero, ToComputedValue)]
|
||||
pub struct Percentage(pub CSSFloat);
|
||||
|
||||
impl Percentage {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue