diff --git a/src/autorouter/selection.rs b/src/autorouter/selection.rs index 89b6896..de6d646 100644 --- a/src/autorouter/selection.rs +++ b/src/autorouter/selection.rs @@ -96,7 +96,7 @@ impl PinSelection { } pub fn contains_node(&self, board: &Board, node: NodeIndex) -> bool { - PinSelector::try_from_node(board, node).map_or(false, |selector| self.0.contains(&selector)) + PinSelector::try_from_node(board, node).is_some_and(|selector| self.0.contains(&selector)) } pub fn selectors(&self) -> impl Iterator { @@ -148,8 +148,7 @@ impl BandSelection { } pub fn contains_node(&self, board: &Board, node: NodeIndex) -> bool { - BandSelector::try_from_node(board, node) - .map_or(false, |selector| self.0.contains(&selector)) + BandSelector::try_from_node(board, node).is_some_and(|selector| self.0.contains(&selector)) } pub fn selectors(&self) -> impl Iterator { @@ -222,7 +221,7 @@ impl Selection { // 2. restrict to complete matches, return associated keys selectors .into_iter() - .filter(|(_, nis)| &nis.0 == &nis.1) + .filter(|(_, nis)| nis.0 == nis.1) .map(|(k, _)| k) .collect::>() } diff --git a/src/board/mod.rs b/src/board/mod.rs index 60f5f1d..e087ca6 100644 --- a/src/board/mod.rs +++ b/src/board/mod.rs @@ -64,12 +64,10 @@ impl<'a> ResolvedSelector<'a> { if let Some(pin_name) = board.node_pinname(&node) { Some(ResolvedSelector::Pin { pin_name, layer }) - } else if let Some(loose) = loose { - Some(ResolvedSelector::Band { + } else { + loose.map(|loose| ResolvedSelector::Band { band_uid: board.layout().drawing().loose_band_uid(loose), }) - } else { - None } } } diff --git a/src/drawing/band.rs b/src/drawing/band.rs index c605117..d4e3cec 100644 --- a/src/drawing/band.rs +++ b/src/drawing/band.rs @@ -54,7 +54,7 @@ impl<'a, CW, R> BandRef<'a, CW, R> { } } -impl<'a, CW: Copy, R: AccessRules> MeasureLength for BandRef<'a, CW, R> { +impl MeasureLength for BandRef<'_, CW, R> { fn length(&self) -> f64 { match self.first_seg { BandTermsegIndex::Straight(seg) => { diff --git a/src/drawing/gear.rs b/src/drawing/gear.rs index c4b94e4..9258106 100644 --- a/src/drawing/gear.rs +++ b/src/drawing/gear.rs @@ -72,19 +72,19 @@ impl<'a, CW: Copy, R: AccessRules> GearRef<'a, CW, R> { } } -impl<'a, CW: Copy, R: AccessRules> GetNextGear for FixedDot<'a, CW, R> { +impl GetNextGear for FixedDot<'_, CW, R> { fn next_gear(&self) -> Option { self.first_gear() } } -impl<'a, CW: Copy, R: AccessRules> GetNextGear for LooseBend<'a, CW, R> { +impl GetNextGear for LooseBend<'_, CW, R> { fn next_gear(&self) -> Option { self.outer() } } -impl<'a, CW: Copy, R: AccessRules> GetNextGear for FixedBend<'a, CW, R> { +impl GetNextGear for FixedBend<'_, CW, R> { fn next_gear(&self) -> Option { self.first_gear() } diff --git a/src/drawing/head.rs b/src/drawing/head.rs index 2a08618..3ef4122 100644 --- a/src/drawing/head.rs +++ b/src/drawing/head.rs @@ -82,13 +82,13 @@ impl<'a, CW, R> HeadRef<'a, CW, R> { } } -impl<'a, CW, R> GetFace for HeadRef<'a, CW, R> { +impl GetFace for HeadRef<'_, CW, R> { fn face(&self) -> DotIndex { self.head.face() } } -impl<'a, CW: Copy, R: AccessRules> MeasureLength for HeadRef<'a, CW, R> { +impl MeasureLength for HeadRef<'_, CW, R> { fn length(&self) -> f64 { match self.head { Head::Bare(..) => 0.0, diff --git a/src/drawing/loose.rs b/src/drawing/loose.rs index 0a1bcf3..b59fd31 100644 --- a/src/drawing/loose.rs +++ b/src/drawing/loose.rs @@ -27,10 +27,10 @@ pub trait GetPrevNextLoose { // when `maybe_*` is `Some(_)`, // but otherwise, they start in opposite direction, here by going via: let maybe_prev = maybe_next.or_else(|| { - let default_neighbor = self.next_loose(None); + // default_neighbor = + self.next_loose(None) // * normally, one would retrieve the next element via `default_neighbor.next_loose(self)` // * `self.next_loose(default_neighbor)` on the other hand inverts the direction we're iterating towards. - default_neighbor }); self.next_loose(maybe_prev) } @@ -88,7 +88,7 @@ impl<'a, CW: Copy, R: AccessRules> Loose<'a, CW, R> { } } -impl<'a, CW: Copy, R: AccessRules> GetPrevNextLoose for LooseDot<'a, CW, R> { +impl GetPrevNextLoose for LooseDot<'_, CW, R> { fn next_loose(&self, maybe_prev: Option) -> Option { let bend = self.bend(); @@ -104,13 +104,13 @@ impl<'a, CW: Copy, R: AccessRules> GetPrevNextLoose for LooseDot<'a, CW, R> { } } -impl<'a, CW: Copy, R: AccessRules> GetPrevNextLoose for LoneLooseSeg<'a, CW, R> { +impl GetPrevNextLoose for LoneLooseSeg<'_, CW, R> { fn next_loose(&self, _maybe_prev: Option) -> Option { None } } -impl<'a, CW: Copy, R: AccessRules> GetPrevNextLoose for SeqLooseSeg<'a, CW, R> { +impl GetPrevNextLoose for SeqLooseSeg<'_, CW, R> { fn next_loose(&self, maybe_prev: Option) -> Option { let joints = self.joints(); let Some(prev) = maybe_prev else { @@ -128,7 +128,7 @@ impl<'a, CW: Copy, R: AccessRules> GetPrevNextLoose for SeqLooseSeg<'a, CW, R> { } } -impl<'a, CW: Copy, R: AccessRules> GetPrevNextLoose for LooseBend<'a, CW, R> { +impl GetPrevNextLoose for LooseBend<'_, CW, R> { fn next_loose(&self, maybe_prev: Option) -> Option { let joints = self.joints(); diff --git a/src/drawing/primitive.rs b/src/drawing/primitive.rs index cc63a67..11d133c 100644 --- a/src/drawing/primitive.rs +++ b/src/drawing/primitive.rs @@ -93,7 +93,7 @@ pub trait GetCore: GetBendIndex { fn core(&self) -> FixedDotIndex; } -impl<'a, S: GetDrawing + GetBendIndex> GetCore for S { +impl GetCore for S { fn core(&self) -> FixedDotIndex { FixedDotIndex::new( self.drawing() @@ -106,9 +106,7 @@ impl<'a, S: GetDrawing + GetBendIndex> GetCore for S { macro_rules! impl_primitive { ($primitive_struct:ident, $weight_struct:ident) => { - impl<'a, CW: Copy, R: AccessRules> GetWeight<$weight_struct> - for $primitive_struct<'a, CW, R> - { + impl GetWeight<$weight_struct> for $primitive_struct<'_, CW, R> { fn weight(&self) -> $weight_struct { if let PrimitiveWeight::$primitive_struct(weight) = self.tagged_weight() { weight @@ -118,13 +116,13 @@ macro_rules! impl_primitive { } } - impl<'a, CW: Copy, R: AccessRules> GetLayer for $primitive_struct<'a, CW, R> { + impl GetLayer for $primitive_struct<'_, CW, R> { fn layer(&self) -> usize { self.weight().layer() } } - impl<'a, CW: Copy, R: AccessRules> GetMaybeNet for $primitive_struct<'a, CW, R> { + impl GetMaybeNet for $primitive_struct<'_, CW, R> { fn maybe_net(&self) -> Option { self.weight().maybe_net() } @@ -202,22 +200,20 @@ impl<'a, W, CW: Copy, R: AccessRules> GenericPrimitive<'a, W, CW, R> { } } -impl<'a, W, CW: Copy, R: AccessRules> GetInterior - for GenericPrimitive<'a, W, CW, R> -{ +impl GetInterior for GenericPrimitive<'_, W, CW, R> { fn interior(&self) -> Vec { vec![self.tagged_weight().retag(self.index.petgraph_index())] } } -impl<'a, W, CW: Copy, R: AccessRules> GetDrawing for GenericPrimitive<'a, W, CW, R> { +impl GetDrawing for GenericPrimitive<'_, W, CW, R> { type Rules = R; fn drawing(&self) -> &Drawing { self.drawing } } -impl<'a, W, CW: Copy, R: AccessRules> GetPetgraphIndex for GenericPrimitive<'a, W, CW, R> { +impl GetPetgraphIndex for GenericPrimitive<'_, W, CW, R> { fn petgraph_index(&self) -> NodeIndex { self.index.petgraph_index() } @@ -248,13 +244,13 @@ where pub type FixedDot<'a, CW, R> = GenericPrimitive<'a, FixedDotWeight, CW, R>; impl_fixed_primitive!(FixedDot, FixedDotWeight); -impl<'a, CW: Copy, R: AccessRules> MakePrimitiveShape for FixedDot<'a, CW, R> { +impl MakePrimitiveShape for FixedDot<'_, CW, R> { fn shape(&self) -> PrimitiveShape { self.drawing.geometry().dot_shape(self.index.into()) } } -impl<'a, CW: Copy, R: AccessRules> GetLimbs for FixedDot<'a, CW, R> { +impl GetLimbs for FixedDot<'_, CW, R> { fn segs(&self) -> Vec { self.drawing .geometry() @@ -270,12 +266,12 @@ impl<'a, CW: Copy, R: AccessRules> GetLimbs for FixedDot<'a, CW, R> { } } -impl<'a, CW: Copy, R: AccessRules> GetFirstGear for FixedDot<'a, CW, R> {} +impl GetFirstGear for FixedDot<'_, CW, R> {} pub type LooseDot<'a, CW, R> = GenericPrimitive<'a, LooseDotWeight, CW, R>; impl_loose_primitive!(LooseDot, LooseDotWeight); -impl<'a, CW: Copy, R: AccessRules> LooseDot<'a, CW, R> { +impl LooseDot<'_, CW, R> { pub fn seg(&self) -> Option { self.drawing .geometry() @@ -294,13 +290,13 @@ impl<'a, CW: Copy, R: AccessRules> LooseDot<'a, CW, R> { } } -impl<'a, CW: Copy, R: AccessRules> MakePrimitiveShape for LooseDot<'a, CW, R> { +impl MakePrimitiveShape for LooseDot<'_, CW, R> { fn shape(&self) -> PrimitiveShape { self.drawing.geometry().dot_shape(self.index.into()) } } -impl<'a, CW: Copy, R: AccessRules> GetLimbs for LooseDot<'a, CW, R> { +impl GetLimbs for LooseDot<'_, CW, R> { fn segs(&self) -> Vec { if let Some(seg) = self.seg() { vec![seg.into()] @@ -317,15 +313,15 @@ impl<'a, CW: Copy, R: AccessRules> GetLimbs for LooseDot<'a, CW, R> { pub type FixedSeg<'a, CW, R> = GenericPrimitive<'a, FixedSegWeight, CW, R>; impl_fixed_primitive!(FixedSeg, FixedSegWeight); -impl<'a, CW: Copy, R: AccessRules> MakePrimitiveShape for FixedSeg<'a, CW, R> { +impl MakePrimitiveShape for FixedSeg<'_, CW, R> { fn shape(&self) -> PrimitiveShape { self.drawing.geometry().seg_shape(self.index.into()) } } -impl<'a, CW: Copy, R: AccessRules> GetLimbs for FixedSeg<'a, CW, R> {} +impl GetLimbs for FixedSeg<'_, CW, R> {} -impl<'a, CW: Copy, R: AccessRules> GetJoints for FixedSeg<'a, CW, R> { +impl GetJoints for FixedSeg<'_, CW, R> { fn joints(&self) -> (FixedDotIndex, FixedDotIndex) { let (from, to) = self.drawing.geometry().seg_joints(self.index.into()); ( @@ -338,17 +334,15 @@ impl<'a, CW: Copy, R: AccessRules> GetJoints for F pub type LoneLooseSeg<'a, CW, R> = GenericPrimitive<'a, LoneLooseSegWeight, CW, R>; impl_loose_primitive!(LoneLooseSeg, LoneLooseSegWeight); -impl<'a, CW: Copy, R: AccessRules> MakePrimitiveShape for LoneLooseSeg<'a, CW, R> { +impl MakePrimitiveShape for LoneLooseSeg<'_, CW, R> { fn shape(&self) -> PrimitiveShape { self.drawing.geometry().seg_shape(self.index.into()) } } -impl<'a, CW: Copy, R: AccessRules> GetLimbs for LoneLooseSeg<'a, CW, R> {} +impl GetLimbs for LoneLooseSeg<'_, CW, R> {} -impl<'a, CW: Copy, R: AccessRules> GetJoints - for LoneLooseSeg<'a, CW, R> -{ +impl GetJoints for LoneLooseSeg<'_, CW, R> { fn joints(&self) -> (FixedDotIndex, FixedDotIndex) { let (from, to) = self.drawing.geometry().seg_joints(self.index.into()); ( @@ -361,15 +355,15 @@ impl<'a, CW: Copy, R: AccessRules> GetJoints pub type SeqLooseSeg<'a, CW, R> = GenericPrimitive<'a, SeqLooseSegWeight, CW, R>; impl_loose_primitive!(SeqLooseSeg, SeqLooseSegWeight); -impl<'a, CW: Copy, R: AccessRules> MakePrimitiveShape for SeqLooseSeg<'a, CW, R> { +impl MakePrimitiveShape for SeqLooseSeg<'_, CW, R> { fn shape(&self) -> PrimitiveShape { self.drawing.geometry().seg_shape(self.index.into()) } } -impl<'a, CW: Copy, R: AccessRules> GetLimbs for SeqLooseSeg<'a, CW, R> {} +impl GetLimbs for SeqLooseSeg<'_, CW, R> {} -impl<'a, CW: Copy, R: AccessRules> GetJoints for SeqLooseSeg<'a, CW, R> { +impl GetJoints for SeqLooseSeg<'_, CW, R> { fn joints(&self) -> (DotIndex, LooseDotIndex) { let joints = self.drawing.geometry().seg_joints(self.index.into()); if let DotWeight::Fixed(..) = self.drawing.geometry().dot_weight(joints.0) { @@ -394,23 +388,21 @@ impl<'a, CW: Copy, R: AccessRules> GetJoints for SeqLoo pub type FixedBend<'a, CW, R> = GenericPrimitive<'a, FixedBendWeight, CW, R>; impl_fixed_primitive!(FixedBend, FixedBendWeight); -impl<'a, CW: Copy, R: AccessRules> GetBendIndex for FixedBend<'a, CW, R> { +impl GetBendIndex for FixedBend<'_, CW, R> { fn bend_index(&self) -> BendIndex { self.index.into() } } -impl<'a, CW: Copy, R: AccessRules> MakePrimitiveShape for FixedBend<'a, CW, R> { +impl MakePrimitiveShape for FixedBend<'_, CW, R> { fn shape(&self) -> PrimitiveShape { self.drawing.geometry().bend_shape(self.index.into()) } } -impl<'a, CW: Copy, R: AccessRules> GetLimbs for FixedBend<'a, CW, R> {} +impl GetLimbs for FixedBend<'_, CW, R> {} -impl<'a, CW: Copy, R: AccessRules> GetJoints - for FixedBend<'a, CW, R> -{ +impl GetJoints for FixedBend<'_, CW, R> { fn joints(&self) -> (FixedDotIndex, FixedDotIndex) { let (from, to) = self.drawing.geometry().bend_joints(self.index.into()); ( @@ -420,13 +412,13 @@ impl<'a, CW: Copy, R: AccessRules> GetJoints } } -impl<'a, CW: Copy, R: AccessRules> GetFirstGear for FixedBend<'a, CW, R> {} +impl GetFirstGear for FixedBend<'_, CW, R> {} //impl<'a, R: QueryRules> GetInnerOuter for FixedBend<'a, CW, R> {} pub type LooseBend<'a, CW, R> = GenericPrimitive<'a, LooseBendWeight, CW, R>; impl_loose_primitive!(LooseBend, LooseBendWeight); -impl<'a, CW: Copy, R: AccessRules> GetBendIndex for LooseBend<'a, CW, R> { +impl GetBendIndex for LooseBend<'_, CW, R> { fn bend_index(&self) -> BendIndex { self.index.into() } @@ -438,23 +430,21 @@ impl<'a, CW: Copy, R: AccessRules> From> for BendIndex { } } -impl<'a, CW: Copy, R: AccessRules> MakePrimitiveShape for LooseBend<'a, CW, R> { +impl MakePrimitiveShape for LooseBend<'_, CW, R> { fn shape(&self) -> PrimitiveShape { self.drawing.geometry().bend_shape(self.index.into()) } } -impl<'a, CW: Copy, R: AccessRules> GetLimbs for LooseBend<'a, CW, R> {} +impl GetLimbs for LooseBend<'_, CW, R> {} -impl<'a, CW: Copy, R: AccessRules> GetOffset for LooseBend<'a, CW, R> { +impl GetOffset for LooseBend<'_, CW, R> { fn offset(&self) -> f64 { self.weight().offset() } } -impl<'a, CW: Copy, R: AccessRules> GetJoints - for LooseBend<'a, CW, R> -{ +impl GetJoints for LooseBend<'_, CW, R> { fn joints(&self) -> (LooseDotIndex, LooseDotIndex) { let (from, to) = self.drawing.geometry().bend_joints(self.index.into()); ( @@ -464,7 +454,7 @@ impl<'a, CW: Copy, R: AccessRules> GetJoints } } -impl<'a, CW: Copy, R: AccessRules> LooseBend<'a, CW, R> { +impl LooseBend<'_, CW, R> { pub fn inner(&self) -> Option { self.drawing() .geometry() diff --git a/src/geometry/geometry.rs b/src/geometry/geometry.rs index f0506ad..72a97dc 100644 --- a/src/geometry/geometry.rs +++ b/src/geometry/geometry.rs @@ -97,6 +97,12 @@ pub struct Geometry { bend_index_marker: PhantomData, } +impl Default for Geometry { + fn default() -> Self { + Self::new() + } +} + impl Geometry { pub fn new() -> Self { Self { diff --git a/src/geometry/recording_with_rtree.rs b/src/geometry/recording_with_rtree.rs index 6dc2262..abff11f 100644 --- a/src/geometry/recording_with_rtree.rs +++ b/src/geometry/recording_with_rtree.rs @@ -312,13 +312,11 @@ impl< } } -fn edit_remove_from_map( +fn edit_remove_from_map( map: &mut std::collections::BTreeMap, Option)>, index: I, data: T, -) where - I: core::cmp::Eq + Ord, -{ +) { let to_be_inserted = (Some(data), None); match map.entry(index) { BTreeMapEntry::Occupied(mut occ) => { diff --git a/src/graph.rs b/src/graph.rs index a0d6ed2..12f19bb 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -41,10 +41,7 @@ impl GenericIndex { impl core::clone::Clone for GenericIndex { #[inline] fn clone(&self) -> Self { - Self { - node_index: self.node_index, - marker: PhantomData, - } + *self } } @@ -67,9 +64,9 @@ impl PartialEq for GenericIndex { impl Eq for GenericIndex {} impl PartialOrd for GenericIndex { - #[inline] + #[inline(always)] fn partial_cmp(&self, other: &Self) -> Option { - self.node_index.partial_cmp(&other.node_index) + Some(self.cmp(other)) } } diff --git a/src/interactor/interaction.rs b/src/interactor/interaction.rs index d404f6b..9578d94 100644 --- a/src/interactor/interaction.rs +++ b/src/interactor/interaction.rs @@ -30,7 +30,7 @@ pub enum InteractionStepper { // - interactively moving a footprint. } -impl<'a, M: AccessMesadata> Step, String> for InteractionStepper { +impl Step, String> for InteractionStepper { type Error = InteractionError; fn step( @@ -41,7 +41,7 @@ impl<'a, M: AccessMesadata> Step, String> for Interaction } } -impl<'a, M: AccessMesadata> Abort> for InteractionStepper { +impl Abort> for InteractionStepper { fn abort(&mut self, _context: &mut ActivityContext) { todo!(); } diff --git a/src/layout/layout.rs b/src/layout/layout.rs index 2b24e91..c91dcfa 100644 --- a/src/layout/layout.rs +++ b/src/layout/layout.rs @@ -384,8 +384,8 @@ impl Layout { end: right_pos.into(), }; let fake_seg = SegShape { - from: left_pos.into(), - to: right_pos.into(), + from: left_pos, + to: right_pos, width: f64::EPSILON * 16.0, }; let mut orig_hline = NormalLine::from(ltr_line); diff --git a/src/layout/poly.rs b/src/layout/poly.rs index 09b5d81..2f61b20 100644 --- a/src/layout/poly.rs +++ b/src/layout/poly.rs @@ -54,7 +54,7 @@ impl<'a, R: AccessRules> Poly<'a, R> { } } -impl<'a, R: AccessRules> GetLayer for Poly<'a, R> { +impl GetLayer for Poly<'_, R> { fn layer(&self) -> usize { if let CompoundWeight::Poly(weight) = self.drawing.compound_weight(self.index.into()) { weight.layer() @@ -64,13 +64,13 @@ impl<'a, R: AccessRules> GetLayer for Poly<'a, R> { } } -impl<'a, R: AccessRules> GetMaybeNet for Poly<'a, R> { +impl GetMaybeNet for Poly<'_, R> { fn maybe_net(&self) -> Option { self.drawing.compound_weight(self.index.into()).maybe_net() } } -impl<'a, R: AccessRules> MakePolygon for Poly<'a, R> { +impl MakePolygon for Poly<'_, R> { fn shape(&self) -> Polygon { Polygon::new( LineString::from( @@ -95,7 +95,7 @@ impl<'a, R: AccessRules> MakePolygon for Poly<'a, R> { } } -impl<'a, R: AccessRules> GetMaybeApex for Poly<'a, R> { +impl GetMaybeApex for Poly<'_, R> { fn maybe_apex(&self) -> Option { self.drawing .geometry() diff --git a/src/layout/via.rs b/src/layout/via.rs index dbfc2ec..b394fbe 100644 --- a/src/layout/via.rs +++ b/src/layout/via.rs @@ -31,13 +31,13 @@ impl<'a, R> Via<'a, R> { } } -impl<'a, R: AccessRules> GetMaybeNet for Via<'a, R> { +impl GetMaybeNet for Via<'_, R> { fn maybe_net(&self) -> Option { self.drawing.compound_weight(self.index.into()).maybe_net() } } -impl<'a, R: AccessRules> MakePrimitiveShape for Via<'a, R> { +impl MakePrimitiveShape for Via<'_, R> { fn shape(&self) -> PrimitiveShape { if let CompoundWeight::Via(weight) = self.drawing.compound_weight(self.index.into()) { weight.shape() diff --git a/src/router/route.rs b/src/router/route.rs index af562c6..733c923 100644 --- a/src/router/route.rs +++ b/src/router/route.rs @@ -74,7 +74,7 @@ impl RouteStepper { } } -impl<'a, R: AccessRules> Step, BandTermsegIndex> for RouteStepper { +impl Step, BandTermsegIndex> for RouteStepper { type Error = AstarError; fn step( diff --git a/src/router/router.rs b/src/router/router.rs index 8a604fd..3de6ec4 100644 --- a/src/router/router.rs +++ b/src/router/router.rs @@ -66,7 +66,7 @@ impl<'a, R> RouterAstarStrategy<'a, R> { } } -impl<'a, R: AccessRules> RouterAstarStrategy<'a, R> { +impl RouterAstarStrategy<'_, R> { fn bihead_length(&self) -> f64 { self.navcord.head.ref_(self.layout.drawing()).length() + match self.navcord.head.face() { @@ -81,8 +81,8 @@ impl<'a, R: AccessRules> RouterAstarStrategy<'a, R> { } } -impl<'a, R: AccessRules> AstarStrategy - for RouterAstarStrategy<'a, R> +impl AstarStrategy + for RouterAstarStrategy<'_, R> { fn is_goal( &mut self, @@ -138,7 +138,7 @@ impl<'a, R: AccessRules> AstarStrategy } fn remove_probe(&mut self, _navmesh: &Navmesh) { - self.navcord.step_back(&mut self.layout); + self.navcord.step_back(self.layout); } fn estimate_cost(&mut self, navmesh: &Navmesh, vertex: NavvertexIndex) -> f64 { diff --git a/src/triangulation.rs b/src/triangulation.rs index dc3e57e..423a9c7 100644 --- a/src/triangulation.rs +++ b/src/triangulation.rs @@ -292,11 +292,10 @@ impl< } impl< - 'a, I: Copy + PartialEq + GetPetgraphIndex + std::fmt::Debug, VW: GetTrianvertexNodeIndex + HasPosition, EW: Default, - > visit::NodeIndexable for &'a Triangulation + > visit::NodeIndexable for &Triangulation { fn node_bound(&self) -> usize { //spade::Triangulation::num_vertices(&self.triangulation)