@@ -85,7 +85,7 @@ fn hash_slice<T>(slice: &[T]) -> u64 {
85
85
/// ensure that edge metadata is recorded as is appropriate for the provided observer.
86
86
///
87
87
/// If you get a type constraint failure for your map due to this type being unfulfilled, you must
88
- /// call [`TrackingHinted::with_index_tracking `] or [`TrackingHinted::with_novelty_tracking `] **at
88
+ /// call [`TrackingHinted::track_indices `] or [`TrackingHinted::track_novelties `] **at
89
89
/// the initialisation site of your map**.
90
90
///
91
91
/// This trait allows various components which interact with map metadata to ensure that the
@@ -111,7 +111,7 @@ fn hash_slice<T>(slice: &[T]) -> u64 {
111
111
/// let edges_observer = StdMapObserver::from_ownedref("edges", OwnedMutSlice::from(vec![0u8; 16]));
112
112
/// // inform the feedback to track indices (required by IndexesLenTimeMinimizerScheduler), but not novelties
113
113
/// // this *MUST* be done before it is passed to MaxMapFeedback!
114
- /// let edges_observer = edges_observer.with_index_tracking ();
114
+ /// let edges_observer = edges_observer.track_indices ();
115
115
///
116
116
/// // init the feedback
117
117
/// let mut feedback = MaxMapFeedback::new(&edges_observer);
@@ -134,7 +134,7 @@ fn hash_slice<T>(slice: &[T]) -> u64 {
134
134
pub trait TrackingHinted {
135
135
/// The resulting type of enabling index tracking.
136
136
type WithIndexTracking : TrackingHinted ;
137
- /// The resulting type of enabling index tracking.
137
+ /// The resulting type of enabling novelty tracking.
138
138
type WithNoveltiesTracking : TrackingHinted ;
139
139
140
140
/// Whether indices should be tracked for this [`MapObserver`].
@@ -143,9 +143,9 @@ pub trait TrackingHinted {
143
143
const NOVELTIES : bool ;
144
144
145
145
/// Convert this map observer into one that tracks indices.
146
- fn with_index_tracking ( self ) -> Self :: WithIndexTracking ;
146
+ fn track_indices ( self ) -> Self :: WithIndexTracking ;
147
147
/// Convert this map observer into one that tracks novelties.
148
- fn with_novelty_tracking ( self ) -> Self :: WithNoveltiesTracking ;
148
+ fn track_novelties ( self ) -> Self :: WithNoveltiesTracking ;
149
149
}
150
150
151
151
/// Struct which wraps [`MapObserver`] instances to explicitly give them tracking data.
@@ -164,11 +164,11 @@ impl<T, const ITH: bool, const NTH: bool> TrackingHinted for ExplicitTracking<T,
164
164
const INDICES : bool = ITH ;
165
165
const NOVELTIES : bool = NTH ;
166
166
167
- fn with_index_tracking ( self ) -> Self :: WithIndexTracking {
167
+ fn track_indices ( self ) -> Self :: WithIndexTracking {
168
168
ExplicitTracking :: < T , true , NTH > ( self . 0 )
169
169
}
170
170
171
- fn with_novelty_tracking ( self ) -> Self :: WithNoveltiesTracking {
171
+ fn track_novelties ( self ) -> Self :: WithNoveltiesTracking {
172
172
ExplicitTracking :: < T , ITH , true > ( self . 0 )
173
173
}
174
174
}
@@ -292,7 +292,7 @@ pub mod macros {
292
292
SPACING , "= note: index tracking is required by " , $name, "\n " ,
293
293
SPACING , "= note: see the documentation of TrackingHinted for details\n " ,
294
294
SPACING , "|\n " ,
295
- SPACING , "= hint: call `.with_index_tracking ()` on the map observer present in the following error notes\n " ,
295
+ SPACING , "= hint: call `.track_indices ()` on the map observer present in the following error notes\n " ,
296
296
SPACING , "|\n " ,
297
297
SPACING , "| " ,
298
298
) ;
@@ -343,7 +343,7 @@ pub mod macros {
343
343
SPACING , "= note: novelty tracking is required by " , $name, "\n " ,
344
344
SPACING , "= note: see the documentation of TrackingHinted for details\n " ,
345
345
SPACING , "|\n " ,
346
- SPACING , "= hint: call `.with_novelty_tracking ()` on the map observer present in the following error notes\n " ,
346
+ SPACING , "= hint: call `.track_novelties ()` on the map observer present in the following error notes\n " ,
347
347
SPACING , "|\n " ,
348
348
SPACING , "| " ,
349
349
) ;
@@ -402,11 +402,11 @@ where
402
402
const INDICES : bool = false ;
403
403
const NOVELTIES : bool = false ;
404
404
405
- fn with_index_tracking ( self ) -> Self :: WithIndexTracking {
405
+ fn track_indices ( self ) -> Self :: WithIndexTracking {
406
406
ExplicitTracking :: < Self , true , false > ( self )
407
407
}
408
408
409
- fn with_novelty_tracking ( self ) -> Self :: WithNoveltiesTracking {
409
+ fn track_novelties ( self ) -> Self :: WithNoveltiesTracking {
410
410
ExplicitTracking :: < Self , false , true > ( self )
411
411
}
412
412
}
0 commit comments