Skip to content

Commit

Permalink
Trim trailing whitespace where cargo fmt cannot
Browse files Browse the repository at this point in the history
- Add `.git-blame-ignore-revs`
  • Loading branch information
s-arash committed Nov 12, 2024
1 parent d8db7dc commit 1a15c67
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# guide: https://gist.github.com/kateinoigakukun/b0bc920e587851bfffa98b9e279175f2
# Run this command for this to take effect:
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs

# Fmt (#54)
d8db7dc7eb9760b2e81d0168cfa931549ed28085
8 changes: 4 additions & 4 deletions ascent_base/src/lattice/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ macro_rules! tuple_lattice_impl {
}
}
}

fn join_mut(&mut self, other: Self) -> bool {
use std::cmp::Ordering::*;
match (&*self).cmp(&other) {
Expand All @@ -31,17 +31,17 @@ macro_rules! tuple_lattice_impl {
fn meet(self, other: Self) -> Self {
self.min(other)
}

fn join(self, other: Self) -> Self {
self.max(other)
}
}

impl< $([<T $i>]),* > BoundedLattice for ($([<T $i>]),*,) where $([<T $i>]: BoundedLattice + Ord),* {
fn bottom() -> Self {
($([<T $i>]::bottom(),)*)
}

fn top() -> Self {
($([<T $i>]::top(),)*)
}
Expand Down
6 changes: 3 additions & 3 deletions byods/ascent-byods-rels/src/adaptor/bin_rel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ macro_rules! to_rel_ind {
fn default() -> Self { Self(PhantomData) }
}

impl<T0, T1, Rel> ToRelIndex<Rel> for [<To $name>]<T0, T1>
impl<T0, T1, Rel> ToRelIndex<Rel> for [<To $name>]<T0, T1>
where Rel: ByodsBinRel<T0 = T0, T1 = T1>,
{
type RelIndex<'a> = $name<'a, Rel> where Self: 'a, Rel: 'a;
fn to_rel_index<'a>(&'a self, rel: &'a Rel) -> Self::RelIndex<'a> { $name(rel) }

type RelIndexWrite<'a> = NoopRelIndexWrite<$key, $val> where Self: 'a, Rel: 'a;
fn to_rel_index_write<'a>(&'a mut self, _rel: &'a mut Rel) -> Self::RelIndexWrite<'a> {
NoopRelIndexWrite::default()
fn to_rel_index_write<'a>(&'a mut self, _rel: &'a mut Rel) -> Self::RelIndexWrite<'a> {
NoopRelIndexWrite::default()
}
}
}};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ mod test {
// reverse_map_1 required:
{$crate::inds_contain!($indices, [1]) || $crate::inds_contain!($indices, [1, 2])},
// reverse_map_2 required:
{$crate::inds_contain!($indices, [2]) || $crate::inds_contain!($indices, [1, 2])},
$col0, $col1, $col2,
{$crate::inds_contain!($indices, [2]) || $crate::inds_contain!($indices, [1, 2])},
$col0, $col1, $col2,
$crate::adaptor::bin_rel_provider::test::DummyRel<$col1, $col2>
>
};
Expand Down
8 changes: 4 additions & 4 deletions byods/ascent-byods-rels/src/adaptor/bin_rel_to_ternary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,13 +720,13 @@ macro_rules! to_trrel2 {
;


impl<'a, T0, T1, T2> Default for [<To $name>]<T0, T1, T2>
impl<'a, T0, T1, T2> Default for [<To $name>]<T0, T1, T2>
where T0: Clone + Hash + Eq, T1: Clone + Hash + Eq, T2: Clone + Hash + Eq//, TBinRel: ByodsBinRel<T0 = T1, T1 = T2>
{
fn default() -> Self { Self(PhantomData) }
}

impl<T0, T1, T2, TBinRel, const HAS_REVERSE_MAP1: bool, const HAS_REVERSE_MAP2: bool>
impl<T0, T1, T2, TBinRel, const HAS_REVERSE_MAP1: bool, const HAS_REVERSE_MAP2: bool>
ToRelIndex<BinRelToTernaryWrapper<HAS_REVERSE_MAP1, HAS_REVERSE_MAP2, T0, T1, T2, TBinRel>> for [<To $name>]<T0, T1, T2>
where T0: Clone + Hash + Eq, T1: Clone + Hash + Eq, T2: Clone + Hash + Eq, TBinRel: ByodsBinRel<T0 = T1, T1 = T2>,
//TWrapper: Deref<Target = BinRelToTernary<T0, T1, T2, TBinRel>>
Expand All @@ -738,8 +738,8 @@ macro_rules! to_trrel2 {

type RelIndexWrite<'a> = NoopRelIndexWrite<$key, $val> where Self: 'a, BinRelToTernaryWrapper<HAS_REVERSE_MAP1, HAS_REVERSE_MAP2, T0, T1, T2, TBinRel>: 'a;
#[inline(always)]
fn to_rel_index_write<'a>(&'a mut self, _rel: &'a mut BinRelToTernaryWrapper<HAS_REVERSE_MAP1, HAS_REVERSE_MAP2, T0, T1, T2, TBinRel>) -> Self::RelIndexWrite<'a> {
NoopRelIndexWrite::default()
fn to_rel_index_write<'a>(&'a mut self, _rel: &'a mut BinRelToTernaryWrapper<HAS_REVERSE_MAP1, HAS_REVERSE_MAP2, T0, T1, T2, TBinRel>) -> Self::RelIndexWrite<'a> {
NoopRelIndexWrite::default()
}
}
}};
Expand Down
2 changes: 1 addition & 1 deletion byods/ascent-byods-rels/src/trrel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ macro_rules! trrel_rel_ind_common {
// reverse_map_1 required:
{$crate::inds_contain!($indices, [1]) || $crate::inds_contain!($indices, [1, 2])},
// reverse_map_2 required:
{$crate::inds_contain!($indices, [2]) || $crate::inds_contain!($indices, [1, 2])},
{$crate::inds_contain!($indices, [2]) || $crate::inds_contain!($indices, [1, 2])},
$col0, $col1>
};
}
Expand Down
6 changes: 3 additions & 3 deletions byods/ascent-byods-rels/src/trrel_binary_ind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,15 @@ macro_rules! to_rel_ind {
fn default() -> Self { Self(PhantomData) }
}

impl<T: Clone + Hash + Eq, Rel> ToRelIndex<Rel> for [<To $name>]<T>
impl<T: Clone + Hash + Eq, Rel> ToRelIndex<Rel> for [<To $name>]<T>
where Rel: ToTrRelIndCommon<T>
{
type RelIndex<'a> = $name<'a, T> where Self: 'a, Rel: 'a;
fn to_rel_index<'a>(&'a self, rel: &'a Rel) -> Self::RelIndex<'a> { $name(rel.to_tr_rel_ind()) }

type RelIndexWrite<'a> = NoopRelIndexWrite<$key, $val> where Self: 'a, Rel: 'a;
fn to_rel_index_write<'a>(&'a mut self, _rel: &'a mut Rel) -> Self::RelIndexWrite<'a> {
NoopRelIndexWrite::default()
fn to_rel_index_write<'a>(&'a mut self, _rel: &'a mut Rel) -> Self::RelIndexWrite<'a> {
NoopRelIndexWrite::default()
}
}
}};
Expand Down
6 changes: 3 additions & 3 deletions byods/ascent-byods-rels/src/trrel_ternary_ind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ macro_rules! to_trrel2 {
fn default() -> Self { Self(PhantomData) }
}

impl<T0: Clone + Hash + Eq, T1: Clone + Hash + Eq, Rel> ToRelIndex<Rel> for [<To $name>]<T0, T1>
impl<T0: Clone + Hash + Eq, T1: Clone + Hash + Eq, Rel> ToRelIndex<Rel> for [<To $name>]<T0, T1>
where Rel: std::ops::DerefMut<Target = TrRel2IndCommon<T0, T1>>
{
type RelIndex<'a> = $name<'a, T0, T1> where Self: 'a, Rel: 'a;
Expand All @@ -504,8 +504,8 @@ macro_rules! to_trrel2 {

type RelIndexWrite<'a> = NoopRelIndexWrite<$key, $val> where Self: 'a, Rel: 'a;
#[inline(always)]
fn to_rel_index_write<'a>(&'a mut self, _rel: &'a mut Rel) -> Self::RelIndexWrite<'a> {
NoopRelIndexWrite::default()
fn to_rel_index_write<'a>(&'a mut self, _rel: &'a mut Rel) -> Self::RelIndexWrite<'a> {
NoopRelIndexWrite::default()
}
}
}};
Expand Down
4 changes: 2 additions & 2 deletions byods/ascent-byods-rels/src/trrel_uf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ macro_rules! trrel_uf_ind_common {
// reverse_map_1 required:
{$crate::inds_contain!($indices, [1]) || $crate::inds_contain!($indices, [1, 2])},
// reverse_map_2 required:
{$crate::inds_contain!($indices, [2]) || $crate::inds_contain!($indices, [1, 2])},
$col0, $col1, $col2,
{$crate::inds_contain!($indices, [2]) || $crate::inds_contain!($indices, [1, 2])},
$col0, $col1, $col2,
$crate::trrel_union_find_binary_ind::TrRelIndCommon<$col1>
>
};
Expand Down

0 comments on commit 1a15c67

Please sign in to comment.