Anthony Ramine
dcae5860a8
Share a single #[animation(no_bound(…))] for the animation traits
2018-03-12 09:48:25 +01:00
Anthony Ramine
6f7425059c
Opt out of bounds on type params for #[derive(ComputeSquaredDistance)]
2018-03-12 09:48:24 +01:00
Anthony Ramine
6ce5e9a869
Never store a squared root in SquaredDistance
2018-03-04 02:10:44 +01:00
Bastien Orivel
9faa579c89
Bump syn/quote in style_derive
2018-02-12 17:08:55 +01:00
Anthony Ramine
41c3be54ea
Implement #[distance(fallback)] for #[derive(ComputeSquaredDistance)]
2017-08-28 12:26:42 +02:00
Anthony Ramine
4a4bf89575
Implement #[animate(fallback)] for #[derive(Animate)]
...
This allows us to derive the Animate trait, providing a fallback function
for when the 2 values aren't similar.
2017-08-28 12:26:36 +02:00
Anthony Ramine
efc852f6e3
Improve handling of trait bounds when deriving fmap-like traits
2017-08-28 10:39:50 +02:00
Anthony Ramine
04ad28b564
Refactor how we handle trait bounds in style_derive
...
For the traits we derive which methods don't depend on associated types (i.e.
all of them but ToAnimatedValue and ToComputedValue), we now add trait bounds
for the actual field types directly, instead of bounding the type parameters.
2017-08-27 23:31:16 +02:00
Anthony Ramine
ff67fc751d
Introduce #[animation]
...
For now, only #[animation(error)] is supported on variants and it makes
both #[derive(Animate)] and #[derive(ComputeSquaredDistance)] ignore
this particular variant.
2017-08-24 11:04:19 +02:00
Anthony Ramine
f275895028
Introduce style_derive::cg
2017-08-23 16:52:04 +02:00
Anthony Ramine
277351da35
Derive ComputeSquaredDistance
2017-08-13 13:34:04 +02:00