Skip to content

Commit

Permalink
Update where clause position
Browse files Browse the repository at this point in the history
  • Loading branch information
MingweiSamuel committed Mar 11, 2022
1 parent 6d1b912 commit 021a7e3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
5 changes: 2 additions & 3 deletions hydroflow/src/builder/surface/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ where
Prev: PushSurface,
Func: FnMut(&Prev::ItemOut) -> bool,
{
type Output<Next>
type Output<Next> = Prev::Output<FilterPushSurfaceReversed<Next, Func>>
where
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>,
= Prev::Output<FilterPushSurfaceReversed<Next, Func>>;
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>;

fn push_to<Next>(self, next: Next) -> Self::Output<Next>
where
Expand Down
5 changes: 2 additions & 3 deletions hydroflow/src/builder/surface/filter_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ where
Prev: PushSurface,
Func: FnMut(Prev::ItemOut) -> Option<Out>,
{
type Output<Next>
type Output<Next> = Prev::Output<FilterMapPushSurfaceReversed<Next, Func, Prev::ItemOut>>
where
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>,
= Prev::Output<FilterMapPushSurfaceReversed<Next, Func, Prev::ItemOut>>;
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>;

fn push_to<Next>(self, next: Next) -> Self::Output<Next>
where
Expand Down
5 changes: 2 additions & 3 deletions hydroflow/src/builder/surface/flatten.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ where
Prev: PushSurface,
Prev::ItemOut: IntoIterator,
{
type Output<Next>
type Output<Next> = Prev::Output<FlattenPushSurfaceReversed<Next, Prev::ItemOut>>
where
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>,
= Prev::Output<FlattenPushSurfaceReversed<Next, Prev::ItemOut>>;
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>;

fn push_to<Next>(self, next: Next) -> Self::Output<Next>
where
Expand Down
5 changes: 2 additions & 3 deletions hydroflow/src/builder/surface/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ where
Prev: PushSurface,
Func: FnMut(Prev::ItemOut) -> Out,
{
type Output<Next>
type Output<Next> = Prev::Output<MapPushSurfaceReversed<Next, Func, Prev::ItemOut>>
where
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>,
= Prev::Output<MapPushSurfaceReversed<Next, Func, Prev::ItemOut>>;
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>;

fn push_to<Next>(self, next: Next) -> Self::Output<Next>
where
Expand Down
5 changes: 2 additions & 3 deletions hydroflow/src/builder/surface/push_pivot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ impl<Pull> PushSurface for PivotPushSurface<Pull>
where
Pull: PullSurface,
{
type Output<Next>
type Output<Next> = PivotSurface<Pull, Next>
where
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>,
= PivotSurface<Pull, Next>;
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>;

fn push_to<Next>(self, next: Next) -> Self::Output<Next>
where
Expand Down
5 changes: 2 additions & 3 deletions hydroflow/src/builder/surface/push_start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ impl<Out> BaseSurface for StartPushSurface<Out> {
}

impl<Out> PushSurface for StartPushSurface<Out> {
type Output<Next>
type Output<Next> = Next
where
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>,
= Next;
Next: PushSurfaceReversed<ItemIn = Self::ItemOut>;

fn push_to<Next>(self, next: Next) -> Self::Output<Next>
where
Expand Down

0 comments on commit 021a7e3

Please sign in to comment.