Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: sync changes from mozilla-central. #21653

Merged
merged 3 commits into from Sep 9, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

style: Use the standalone struct and enum for the flags in SVG path.

We define the standalone types for using derive macro easily and overriding
the behaviors of this traits. This could avoid defining the general
behavior of booleans.

Depends on D4788

Differential Revision: https://phabricator.services.mozilla.com/D4813
  • Loading branch information
BorisChiou authored and emilio committed Sep 9, 2018
commit 31fc6cd565479144b9b0c2d3fff09caad8089df7
@@ -141,20 +141,6 @@ impl Animate for f64 {
}
}

/// This is only used in SVG PATH. We return Err(()) if the flags are mismatched.
// FIXME: Bug 653928: If we want to do interpolation on the flags in Arc, we have to update this
// because `absolute`, `large_arc_flag`, and `sweep_flag` are using this implementation for now.
impl Animate for bool {
#[inline]
fn animate(&self, other: &Self, _procedure: Procedure) -> Result<Self, ()> {
if *self == *other {
Ok(*other)
} else {
Err(())
}
}
}

impl<T> Animate for Option<T>
where
T: Animate,
@@ -81,13 +81,6 @@ impl ComputeSquaredDistance for Au {
}
}

impl ComputeSquaredDistance for bool {
#[inline]
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
(*self as i32).compute_squared_distance(&(*other as i32))
}
}

impl<T> ComputeSquaredDistance for Option<T>
where
T: ComputeSquaredDistance,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.