mirror of
https://gitlab.com/artofrev/smallint.git
synced 2026-07-20 08:20:22 -04:00
eliminate free function
This commit is contained in:
+5
-9
@@ -10,8 +10,11 @@ macro_rules! logic_op {
|
||||
$i:ident, $j:ident, $r:ident, $s:ident;
|
||||
$inline_heap:tt, $heap_heap:tt
|
||||
) => {
|
||||
fn $fun(a: &$typ, b: &$typ) -> $typ {
|
||||
match (&a.0, &b.0) {
|
||||
impl<'a, 'b> $imp<&'a $typ> for &'b $typ {
|
||||
type Output = $typ;
|
||||
|
||||
fn $fun(self, rhs: &$typ) -> Self::Output {
|
||||
match (&self.0, &rhs.0) {
|
||||
(&$typ_inner::Inline($i), &$typ_inner::Inline($j)) => {
|
||||
$typ($typ_inner::Inline($i.$fun($j)))
|
||||
}
|
||||
@@ -26,13 +29,6 @@ macro_rules! logic_op {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'b> $imp<&'a $typ> for &'b $typ {
|
||||
type Output = $typ;
|
||||
|
||||
fn $fun(self, rhs: &$typ) -> Self::Output {
|
||||
$fun(self, rhs)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> $imp<$typ> for &'a $typ {
|
||||
|
||||
Reference in New Issue
Block a user