@@ -90,17 +90,17 @@ pub unsafe trait Searcher<A: Hay + ?Sized> {
90
90
///
91
91
/// This method is used to support the following standard algorithms:
92
92
///
93
- /// * [`matches`](std::needle ::ext::matches)
94
- /// * [`contains`](std::needle ::ext::contains)
95
- /// * [`match_indices`](std::needle ::ext::match_indices)
96
- /// * [`find`](std::needle ::ext::find)
97
- /// * [`match_ranges`](std::needle ::ext::match_ranges)
98
- /// * [`find_range`](std::needle ::ext::find_range)
99
- /// * [`split`](std::needle ::ext::split)
100
- /// * [`split_terminator`](std::needle ::ext::split_terminator)
101
- /// * [`splitn`](std::needle ::ext::splitn)
102
- /// * [`replace_with`](std::needle ::ext::replace_with)
103
- /// * [`replacen_with`](std::needle ::ext::replacen_with)
93
+ /// * [`matches`](super ::ext::matches)
94
+ /// * [`contains`](super ::ext::contains)
95
+ /// * [`match_indices`](super ::ext::match_indices)
96
+ /// * [`find`](super ::ext::find)
97
+ /// * [`match_ranges`](super ::ext::match_ranges)
98
+ /// * [`find_range`](super ::ext::find_range)
99
+ /// * [`split`](super ::ext::split)
100
+ /// * [`split_terminator`](super ::ext::split_terminator)
101
+ /// * [`splitn`](super ::ext::splitn)
102
+ /// * [`replace_with`](super ::ext::replace_with)
103
+ /// * [`replacen_with`](super ::ext::replacen_with)
104
104
///
105
105
/// The hay and the restricted range for searching can be recovered by
106
106
/// calling `span`[`.into_parts()`](Span::into_parts). The range returned
@@ -135,7 +135,7 @@ pub unsafe trait Consumer<A: Hay + ?Sized> {
135
135
/// Checks if the needle can be found at the beginning of the span.
136
136
///
137
137
/// This method is used to implement the standard algorithm
138
- /// [`starts_with()`](std::needle ::ext::starts_with) as well as providing the default
138
+ /// [`starts_with()`](super ::ext::starts_with) as well as providing the default
139
139
/// implementation for [`.trim_start()`](Consumer::trim_start).
140
140
///
141
141
/// The hay and the restricted range for searching can be recovered by
@@ -150,7 +150,7 @@ pub unsafe trait Consumer<A: Hay + ?Sized> {
150
150
/// Repeatedly removes prefixes of the hay which matches the needle.
151
151
///
152
152
/// This method is used to implement the standard algorithm
153
- /// [`trim_start()`](std::needle ::ext::trim_start).
153
+ /// [`trim_start()`](super ::ext::trim_start).
154
154
///
155
155
/// Returns the start index of the slice after all prefixes are removed.
156
156
///
@@ -189,14 +189,14 @@ pub unsafe trait ReverseSearcher<A: Hay + ?Sized>: Searcher<A> {
189
189
///
190
190
/// This method is used to support the following standard algorithms:
191
191
///
192
- /// * [`rmatches`](std::needle ::ext::rmatches)
193
- /// * [`rmatch_indices`](std::needle ::ext::rmatch_indices)
194
- /// * [`rfind`](std::needle ::ext::find)
195
- /// * [`rmatch_ranges`](std::needle ::ext::rmatch_ranges)
196
- /// * [`rfind_range`](std::needle ::ext::rfind_range)
197
- /// * [`rsplit`](std::needle ::ext::rsplit)
198
- /// * [`rsplit_terminator`](std::needle ::ext::rsplit_terminator)
199
- /// * [`rsplitn`](std::needle ::ext::rsplitn)
192
+ /// * [`rmatches`](super ::ext::rmatches)
193
+ /// * [`rmatch_indices`](super ::ext::rmatch_indices)
194
+ /// * [`rfind`](super ::ext::find)
195
+ /// * [`rmatch_ranges`](super ::ext::rmatch_ranges)
196
+ /// * [`rfind_range`](super ::ext::rfind_range)
197
+ /// * [`rsplit`](super ::ext::rsplit)
198
+ /// * [`rsplit_terminator`](super ::ext::rsplit_terminator)
199
+ /// * [`rsplitn`](super ::ext::rsplitn)
200
200
///
201
201
/// The hay and the restricted range for searching can be recovered by
202
202
/// calling `span`[`.into_parts()`](Span::into_parts). The returned range
@@ -221,7 +221,7 @@ pub unsafe trait ReverseConsumer<A: Hay + ?Sized>: Consumer<A> {
221
221
/// Checks if the needle can be found at the end of the span.
222
222
///
223
223
/// This method is used to implement the standard algorithm
224
- /// [`ends_with()`](std::needle ::ext::ends_with) as well as providing the default
224
+ /// [`ends_with()`](super ::ext::ends_with) as well as providing the default
225
225
/// implementation for [`.trim_end()`](ReverseConsumer::trim_end).
226
226
///
227
227
/// The hay and the restricted range for searching can be recovered by
@@ -236,7 +236,7 @@ pub unsafe trait ReverseConsumer<A: Hay + ?Sized>: Consumer<A> {
236
236
/// Repeatedly removes suffixes of the hay which matches the needle.
237
237
///
238
238
/// This method is used to implement the standard algorithm
239
- /// [`trim_end()`](std::needle ::ext::trim_end).
239
+ /// [`trim_end()`](super ::ext::trim_end).
240
240
///
241
241
/// A fast generic implementation in terms of
242
242
/// [`.rconsume()`](ReverseConsumer::rconsume) is provided by default.
@@ -261,36 +261,36 @@ pub unsafe trait ReverseConsumer<A: Hay + ?Sized>: Consumer<A> {
261
261
/// A searcher which can be searched from both end with consistent results.
262
262
///
263
263
/// Implementing this marker trait enables the following standard algorithms to
264
- /// return [`DoubleEndedIterator`](std ::iter::DoubleEndedIterator)s:
264
+ /// return [`DoubleEndedIterator`](crate ::iter::DoubleEndedIterator)s:
265
265
///
266
- /// * [`matches`](std::needle ::ext::matches) /
267
- /// [`rmatches`](std::needle ::ext::rmatches)
268
- /// * [`match_indices`](std::needle ::ext::match_indices) /
269
- /// [`rmatch_indices`](std::needle ::ext::rmatch_indices)
270
- /// * [`match_ranges`](std::needle ::ext::match_ranges) /
271
- /// [`rmatch_ranges`](std::needle ::ext::rmatch_ranges)
272
- /// * [`split`](std::needle ::ext::split) /
273
- /// [`rsplit`](std::needle ::ext::rsplit)
274
- /// * [`split_terminator`](std::needle ::ext::split_terminator) /
275
- /// [`rsplit_terminator`](std::needle ::ext::rsplit_terminator)
276
- /// * [`splitn`](std::needle ::ext::splitn) /
277
- /// [`rsplitn`](std::needle ::ext::rsplitn)
266
+ /// * [`matches`](super ::ext::matches) /
267
+ /// [`rmatches`](super ::ext::rmatches)
268
+ /// * [`match_indices`](super ::ext::match_indices) /
269
+ /// [`rmatch_indices`](super ::ext::rmatch_indices)
270
+ /// * [`match_ranges`](super ::ext::match_ranges) /
271
+ /// [`rmatch_ranges`](super ::ext::rmatch_ranges)
272
+ /// * [`split`](super ::ext::split) /
273
+ /// [`rsplit`](super ::ext::rsplit)
274
+ /// * [`split_terminator`](super ::ext::split_terminator) /
275
+ /// [`rsplit_terminator`](super ::ext::rsplit_terminator)
276
+ /// * [`splitn`](super ::ext::splitn) /
277
+ /// [`rsplitn`](super ::ext::rsplitn)
278
278
pub unsafe trait DoubleEndedSearcher < A : Hay + ?Sized > : ReverseSearcher < A > { }
279
279
280
280
/// A consumer which can be searched from both end with consistent results.
281
281
///
282
282
/// It is used to support the following standard algorithm:
283
283
///
284
- /// * [`trim`](std::needle ::ext::trim)
284
+ /// * [`trim`](super ::ext::trim)
285
285
///
286
286
/// The `trim` function is implemented by calling
287
- /// [`trim_start`](std::needle:: ext::trim_start) and [`trim_end`](std::needle ::ext::trim_end)
287
+ /// [`trim_start`](super:: ext::trim_start) and [`trim_end`](super ::ext::trim_end)
288
288
/// together. This trait encodes the fact that we can call these two functions in any order.
289
289
pub unsafe trait DoubleEndedConsumer < A : Hay + ?Sized > : ReverseConsumer < A > { }
290
290
291
291
/// A needle, a type which can be converted into a searcher.
292
292
///
293
- /// When using search algorithms like [`split()`](std::needle ::ext::split), users will
293
+ /// When using search algorithms like [`split()`](super ::ext::split), users will
294
294
/// search with a `Needle` e.g. a `&str`. A needle is usually stateless,
295
295
/// however for efficient searching, we often need some preprocessing and
296
296
/// maintain a mutable state. The preprocessed structure is called the
0 commit comments