Generalize Refineable derive macro to derive arbitrary traits on the refinement type
This commit is contained in:
parent
dba41e99dd
commit
28d3d21108
6 changed files with 24 additions and 40 deletions
|
@ -136,7 +136,7 @@ impl ToJson for RectF {
|
|||
}
|
||||
|
||||
#[derive(Refineable, Debug)]
|
||||
#[refineable(debug)]
|
||||
#[refineable(Debug)]
|
||||
pub struct Point<T: Clone + Default + Debug> {
|
||||
pub x: T,
|
||||
pub y: T,
|
||||
|
@ -161,7 +161,7 @@ impl<T: Clone + Default + Debug> Into<taffy::geometry::Point<T>> for Point<T> {
|
|||
}
|
||||
|
||||
#[derive(Refineable, Clone, Debug)]
|
||||
#[refineable(debug)]
|
||||
#[refineable(Debug)]
|
||||
pub struct Size<T: Clone + Default + Debug> {
|
||||
pub width: T,
|
||||
pub height: T,
|
||||
|
@ -227,7 +227,7 @@ impl Size<Length> {
|
|||
}
|
||||
|
||||
#[derive(Clone, Default, Refineable, Debug)]
|
||||
#[refineable(debug)]
|
||||
#[refineable(Debug)]
|
||||
pub struct Edges<T: Clone + Default + Debug> {
|
||||
pub top: T,
|
||||
pub right: T,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue