diff --git a/fj/src/syntax.rs b/fj/src/syntax.rs index 7c809c713..63d08ee89 100644 --- a/fj/src/syntax.rs +++ b/fj/src/syntax.rs @@ -1,3 +1,24 @@ +pub trait Group { + fn group(&self, other: &Other) -> crate::Group + where + Other: Clone + Into; +} + +impl Group for T +where + T: Clone + Into, +{ + fn group(&self, other: &Other) -> crate::Group + where + Other: Clone + Into, + { + let a = self.clone().into(); + let b = other.clone().into(); + + crate::Group { a, b } + } +} + pub trait Rotate { /// Create a rotation /// @@ -69,24 +90,3 @@ where } } } - -pub trait Group { - fn group(&self, other: &Other) -> crate::Group - where - Other: Clone + Into; -} - -impl Group for T -where - T: Clone + Into, -{ - fn group(&self, other: &Other) -> crate::Group - where - Other: Clone + Into, - { - let a = self.clone().into(); - let b = other.clone().into(); - - crate::Group { a, b } - } -}