diff --git a/mapf/src/directed/simple.rs b/mapf/src/directed/simple.rs index 0a10ff7..abcf2d7 100644 --- a/mapf/src/directed/simple.rs +++ b/mapf/src/directed/simple.rs @@ -81,7 +81,7 @@ impl crate::Graph for SimpleGraph { type Vertex = V; type Edge = (usize, usize); - type EdgeIter<'a> where Self: 'a = impl Iterator + 'a; + type EdgeIter<'a> = impl Iterator + 'a where Self: 'a; fn vertex (&self, key: usize) -> Option { self.vertices.get(key).cloned() diff --git a/mapf/src/expander/chain.rs b/mapf/src/expander/chain.rs index 0db17c3..ffb70ce 100644 --- a/mapf/src/expander/chain.rs +++ b/mapf/src/expander/chain.rs @@ -43,7 +43,7 @@ impl> Expander for Chain { impl, C: Targeted, G: Goal> Targeted for Chain { type TargetedError = ChainErr; - type TargetedExpansion<'a> where Self: 'a, G: 'a = impl Iterator, Self::TargetedError>> + 'a; + type TargetedExpansion<'a> = impl Iterator, Self::TargetedError>> + 'a where Self: 'a, G: 'a; fn expand<'a>( &'a self, @@ -62,7 +62,7 @@ where G: Goal, { type InitTargetedError = E::InitTargetedError; - type InitialTargetedNodes<'a> where Self: 'a, S: 'a, G: 'a = E::InitialTargetedNodes<'a>; + type InitialTargetedNodes<'a> = E::InitialTargetedNodes<'a> where Self: 'a, S: 'a, G: 'a; fn start<'a>( &'a self, diff --git a/mapf/src/expander/closure.rs b/mapf/src/expander/closure.rs index e58e23c..defb693 100644 --- a/mapf/src/expander/closure.rs +++ b/mapf/src/expander/closure.rs @@ -59,7 +59,7 @@ where F: Fn(&Arc, &G) -> Exp { type TargetedError = Err; - type TargetedExpansion<'a> where Self: 'a = Exp; + type TargetedExpansion<'a> = Exp where Self: 'a; fn expand<'a>( &'a self, diff --git a/mapf/src/expander/constrain.rs b/mapf/src/expander/constrain.rs index b3921df..be360c5 100644 --- a/mapf/src/expander/constrain.rs +++ b/mapf/src/expander/constrain.rs @@ -57,7 +57,7 @@ impl Expander for Constrain { impl, C: TargetedConstraint, G: Goal> Targeted for Constrain { type TargetedError = ConstrainErr; - type TargetedExpansion<'a> where Self: 'a, G: 'a = impl Iterator, Self::TargetedError>> + 'a; + type TargetedExpansion<'a> = impl Iterator, Self::TargetedError>> + 'a where Self: 'a, G: 'a ; fn expand<'a>( &'a self, @@ -77,7 +77,7 @@ where G: Goal, { type InitTargetedError = ConstrainErr; - type InitialTargetedNodes<'a> where Self: 'a, S: 'a, G: 'a = impl Iterator, Self::InitTargetedError>> + 'a; + type InitialTargetedNodes<'a> = impl Iterator, Self::InitTargetedError>> + 'a where Self: 'a, S: 'a, G: 'a; fn start<'a>( &'a self, diff --git a/mapf/src/lib.rs b/mapf/src/lib.rs index d2b7a14..1e94fab 100644 --- a/mapf/src/lib.rs +++ b/mapf/src/lib.rs @@ -14,7 +14,7 @@ * limitations under the License. * */ -#![feature(generic_associated_types, associated_type_bounds, type_alias_impl_trait)] +#![feature(associated_type_bounds, type_alias_impl_trait)] pub mod progress; diff --git a/mapf/src/motion/graph_search.rs b/mapf/src/motion/graph_search.rs index 99f3bbd..b49d464 100644 --- a/mapf/src/motion/graph_search.rs +++ b/mapf/src/motion/graph_search.rs @@ -291,7 +291,7 @@ where P::Reach: Reachable, { type TargetedError = ExpansionErrorOf; - type TargetedExpansion<'a> where P: 'a, G: 'a = impl Iterator, ExpansionErrorOf>> + 'a; + type TargetedExpansion<'a> = impl Iterator, ExpansionErrorOf>> + 'a where P: 'a, G: 'a ; fn expand<'a>( &'a self, @@ -338,7 +338,7 @@ where impl Aimless for Expander

{ type AimlessError = ExtrapolatorErrorOf

; - type AimlessExpansion<'a> where P: 'a = impl Iterator, Self::AimlessError>> + 'a; + type AimlessExpansion<'a> = impl Iterator, Self::AimlessError>> + 'a where P: 'a; fn aimless_expand<'a>( &'a self, diff --git a/mapf/src/motion/hold.rs b/mapf/src/motion/hold.rs index d250b2b..2bd1d30 100644 --- a/mapf/src/motion/hold.rs +++ b/mapf/src/motion/hold.rs @@ -60,7 +60,7 @@ impl, N> Expander for Hold { impl, N: Informed + Movable, G: Goal> Targeted for Hold { type TargetedError = NoError; - type TargetedExpansion<'a> where W: 'a, N: 'a, C: 'a, G: 'a = impl Iterator, NoError>>; + type TargetedExpansion<'a> = impl Iterator, NoError>> where W: 'a, N: 'a, C: 'a, G: 'a ; fn expand<'a>( &'a self, diff --git a/mapf/src/motion/r2/graph_search.rs b/mapf/src/motion/r2/graph_search.rs index df50c1e..bd1f174 100644 --- a/mapf/src/motion/r2/graph_search.rs +++ b/mapf/src/motion/r2/graph_search.rs @@ -105,7 +105,7 @@ where H: Heuristic, { type InitAimlessError = InitErrorR2; - type InitialAimlessNodes<'a> where G: 'a, C: 'a, H: 'a, S: 'a = impl Iterator, Self::InitAimlessError>>; + type InitialAimlessNodes<'a> = impl Iterator, Self::InitAimlessError>> + 'a where G: 'a, C: 'a, H: 'a, S: 'a; fn aimless_start<'a>( &'a self, @@ -141,7 +141,7 @@ where H: Heuristic, { type InitTargetedError = InitErrorR2; - type InitialTargetedNodes<'a> where G: 'a, C: 'a, H: 'a, S: 'a = impl Iterator, Self::InitTargetedError>>; + type InitialTargetedNodes<'a> = impl Iterator, Self::InitTargetedError>> + 'a where G: 'a, C: 'a, H: 'a, S: 'a ; fn start<'a>( &'a self, diff --git a/mapf/src/motion/reach.rs b/mapf/src/motion/reach.rs index 5593d0c..a686279 100644 --- a/mapf/src/motion/reach.rs +++ b/mapf/src/motion/reach.rs @@ -35,7 +35,7 @@ pub trait Reachable { pub struct NoReach; impl Reachable for NoReach { type ReachError = NoError; - type Reaching<'a> where N: 'a, G: 'a, W: 'a = impl Iterator, NoError>>; + type Reaching<'a> = impl Iterator, NoError>> where N: 'a, G: 'a, W: 'a ; fn reach_for<'a>(&'a self, _: &'a N, _: &'a G) -> Self::Reaching<'a> { [].into_iter() diff --git a/mapf/src/motion/se2/graph_search.rs b/mapf/src/motion/se2/graph_search.rs index b097e88..bf8de16 100644 --- a/mapf/src/motion/se2/graph_search.rs +++ b/mapf/src/motion/se2/graph_search.rs @@ -127,7 +127,7 @@ pub struct ReachForLinearSE2 { impl Reachable, GoalSE2, se2::timed_position::Waypoint> for ReachForLinearSE2 { type ReachError = NoError; - type Reaching<'a> = impl Iterator>; + type Reaching<'a> = impl Iterator> + 'a; fn reach_for<'a>(&'a self, parent: &'a Node, goal: &'a GoalSE2) -> Self::Reaching<'a> { [parent].into_iter() @@ -298,7 +298,7 @@ where H: Heuristic, GoalSE2, i64>, { type InitTargetedError = InitErrorSE2; - type InitialTargetedNodes<'a> where G: 'a, C: 'a, H: 'a, S: 'a = impl Iterator>, Self::InitTargetedError>> + 'a; + type InitialTargetedNodes<'a> = impl Iterator>, Self::InitTargetedError>> + 'a where G: 'a, C: 'a, H: 'a, S: 'a; fn start<'a>( &'a self, diff --git a/mapf/src/node/closed_set.rs b/mapf/src/node/closed_set.rs index 91474b7..20de2fa 100644 --- a/mapf/src/node/closed_set.rs +++ b/mapf/src/node/closed_set.rs @@ -102,7 +102,7 @@ impl Default for PartialKeyedClosedSet { } impl ClosedSet for PartialKeyedClosedSet { - type Iter<'a> where N: 'a = impl Iterator> + 'a; + type Iter<'a> = impl Iterator> + 'a where N: 'a; fn close(&mut self, node: &Arc) -> CloseResult { if let Some(key) = node.partial_key() { @@ -169,7 +169,7 @@ impl Default for TimeVariantPartialKeyedClos } impl ClosedSet for TimeVariantPartialKeyedClosetSet { - type Iter<'a> where N: 'a = impl Iterator> + 'a; + type Iter<'a> = impl Iterator> + 'a where N: 'a ; fn close(&mut self, node: &Arc) -> CloseResult { if let Some(key) = node.partial_key() { diff --git a/mapf/src/occupancy/graph.rs b/mapf/src/occupancy/graph.rs index d0ab323..ff16046 100644 --- a/mapf/src/occupancy/graph.rs +++ b/mapf/src/occupancy/graph.rs @@ -86,7 +86,7 @@ impl Graph for VisibilityGraph { type Key = Cell; type Vertex = Point; type Edge = (Cell, Cell); - type EdgeIter<'a> where Self: 'a = impl Iterator + 'a; + type EdgeIter<'a> = impl Iterator + 'a where Self: 'a; fn vertex(&self, cell: Self::Key) -> Option { // We don't bother to filter out occupied cells because those cells will @@ -162,7 +162,7 @@ impl Graph for NeighborhoodGraph { type Key = Cell; type Vertex = Point; type Edge = (Cell, Cell); - type EdgeIter<'a> where Self: 'a = impl Iterator + 'a; + type EdgeIter<'a> = impl Iterator + 'a where Self: 'a; fn vertex(&self, cell: Self::Key) -> Option { if self.visibility.grid().is_occupied(&cell) {