Skip to content

Commit fa5d8b4

Browse files
authored
fix nightly clippy
The needless_lifetimes lint became active and now fires a bunch of times in our repo. This just fixes the violations.
1 parent c9b7732 commit fa5d8b4

File tree

12 files changed

+23
-23
lines changed

12 files changed

+23
-23
lines changed

crates/rsonpath-lib/src/automaton.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub(crate) struct SimpleSlice {
5959
step: JsonUInt,
6060
}
6161

62-
impl<'q> Default for StateTable<'q> {
62+
impl Default for StateTable<'_> {
6363
#[inline]
6464
fn default() -> Self {
6565
Self {
@@ -71,7 +71,7 @@ impl<'q> Default for StateTable<'q> {
7171
}
7272
}
7373

74-
impl<'q> PartialEq for StateTable<'q> {
74+
impl PartialEq for StateTable<'_> {
7575
#[inline]
7676
fn eq(&self, other: &Self) -> bool {
7777
return self.fallback_state == other.fallback_state
@@ -88,7 +88,7 @@ impl<'q> PartialEq for StateTable<'q> {
8888
}
8989
}
9090

91-
impl<'q> Eq for StateTable<'q> {}
91+
impl Eq for StateTable<'_> {}
9292

9393
impl<'q> Index<State> for Automaton<'q> {
9494
type Output = StateTable<'q>;
@@ -442,7 +442,7 @@ impl Display for ArrayTransitionLabel {
442442
}
443443
}
444444

445-
impl<'q> Display for Automaton<'q> {
445+
impl Display for Automaton<'_> {
446446
#[inline]
447447
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
448448
writeln!(f, "digraph {{")?;

crates/rsonpath-lib/src/automaton/nfa.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl Display for NfaStateId {
143143
}
144144
}
145145

146-
impl<'q> Display for NondeterministicAutomaton<'q> {
146+
impl Display for NondeterministicAutomaton<'_> {
147147
// This is the format for https://paperman.name/semigroup/
148148
// for easy debugging of minimization.
149149
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {

crates/rsonpath-lib/src/classification/memmem/nosimd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ where
3333
iter: &'b mut I::BlockIterator<'i, 'r, R, N>,
3434
}
3535

36-
impl<'i, 'b, 'r, I, R, const N: usize> SequentialMemmemClassifier<'i, 'b, 'r, I, R, N>
36+
impl<'i, 'r, I, R, const N: usize> SequentialMemmemClassifier<'i, '_, 'r, I, R, N>
3737
where
3838
I: Input,
3939
R: InputRecorder<I::Block<'i, N>> + 'r,

crates/rsonpath-lib/src/engine/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ where
258258
}
259259
}
260260

261-
impl<'i, 'q, 'r, I, R, V> Executor<'i, 'q, 'r, I, R, V>
261+
impl<'i, 'r, I, R, V> Executor<'i, '_, 'r, I, R, V>
262262
where
263263
'i: 'r,
264264
I: Input,
@@ -751,7 +751,7 @@ impl SmallStack {
751751
}
752752
}
753753

754-
impl<'i, 'q, 'r, I, R, V> CanHeadSkip<'i, 'r, I, R, V> for Executor<'i, 'q, 'r, I, R, V>
754+
impl<'i, 'r, I, R, V> CanHeadSkip<'i, 'r, I, R, V> for Executor<'i, '_, 'r, I, R, V>
755755
where
756756
I: Input,
757757
R: Recorder<I::Block<'i, BLOCK_SIZE>>,

crates/rsonpath-lib/src/input/borrowed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ where
8888
}
8989
}
9090

91-
impl<'a> Input for BorrowedBytes<'a> {
91+
impl Input for BorrowedBytes<'_> {
9292
type BlockIterator<'b, 'r, R, const N: usize> = BorrowedBytesBlockIterator<'r, TwoSidesPaddedInput<'b>, R, N>
9393
where Self: 'b,
9494
R: InputRecorder<&'b [u8]> + 'r;

crates/rsonpath-lib/src/input/buffered.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ impl<R: Read> Input for BufferedInput<R> {
229229
}
230230
}
231231

232-
impl<'a, 'r, R: Read, IR, const N: usize> InputBlockIterator<'a, N> for BufferedInputBlockIterator<'a, 'r, R, IR, N>
232+
impl<'a, R: Read, IR, const N: usize> InputBlockIterator<'a, N> for BufferedInputBlockIterator<'a, '_, R, IR, N>
233233
where
234234
IR: InputRecorder<BufferedInputBlock<N>>,
235235
{
@@ -284,7 +284,7 @@ impl<const N: usize> Deref for BufferedInputBlock<N> {
284284
}
285285
}
286286

287-
impl<'a, const N: usize> InputBlock<'a, N> for BufferedInputBlock<N> {
287+
impl<const N: usize> InputBlock<'_, N> for BufferedInputBlock<N> {
288288
#[inline(always)]
289289
fn halves(&self) -> (&[u8], &[u8]) {
290290
assert_eq!(N % 2, 0);

crates/rsonpath-lib/src/input/padding.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl PaddedBlock {
5959
}
6060
}
6161

62-
impl<'a> SliceSeekable for EndPaddedInput<'a> {
62+
impl SliceSeekable for EndPaddedInput<'_> {
6363
#[cold]
6464
#[inline(never)]
6565
fn seek_backward(&self, from: usize, needle: u8) -> Option<usize> {
@@ -109,7 +109,7 @@ impl<'a> SliceSeekable for EndPaddedInput<'a> {
109109
}
110110
}
111111

112-
impl<'a> SliceSeekable for TwoSidesPaddedInput<'a> {
112+
impl SliceSeekable for TwoSidesPaddedInput<'_> {
113113
#[cold]
114114
#[inline(never)]
115115
fn seek_backward(&self, from: usize, needle: u8) -> Option<usize> {

crates/rsonpath-lib/src/result/approx_span.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl<'s, S> ApproxSpanRecorder<'s, S> {
3535
}
3636
}
3737

38-
impl<'s, B: Deref<Target = [u8]>, S> InputRecorder<B> for ApproxSpanRecorder<'s, S>
38+
impl<B: Deref<Target = [u8]>, S> InputRecorder<B> for ApproxSpanRecorder<'_, S>
3939
where
4040
S: Sink<MatchSpan>,
4141
{
@@ -45,7 +45,7 @@ where
4545
}
4646
}
4747

48-
impl<'s, B: Deref<Target = [u8]>, S> Recorder<B> for ApproxSpanRecorder<'s, S>
48+
impl<B: Deref<Target = [u8]>, S> Recorder<B> for ApproxSpanRecorder<'_, S>
4949
where
5050
S: Sink<MatchSpan>,
5151
{
@@ -73,7 +73,7 @@ impl<'s, S> InternalRecorder<'s, S> {
7373
}
7474
}
7575

76-
impl<'s, S> InternalRecorder<'s, S>
76+
impl<S> InternalRecorder<'_, S>
7777
where
7878
S: Sink<MatchSpan>,
7979
{

crates/rsonpath-lib/src/result/index.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl<'s, S> IndexRecorder<'s, S> {
1919
}
2020
}
2121

22-
impl<'s, B: Deref<Target = [u8]>, S> InputRecorder<B> for IndexRecorder<'s, S>
22+
impl<B: Deref<Target = [u8]>, S> InputRecorder<B> for IndexRecorder<'_, S>
2323
where
2424
S: Sink<MatchIndex>,
2525
{
@@ -29,7 +29,7 @@ where
2929
}
3030
}
3131

32-
impl<'s, B: Deref<Target = [u8]>, S> Recorder<B> for IndexRecorder<'s, S>
32+
impl<B: Deref<Target = [u8]>, S> Recorder<B> for IndexRecorder<'_, S>
3333
where
3434
S: Sink<MatchIndex>,
3535
{

crates/rsonpath-lib/src/result/nodes.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ where
3232
}
3333
}
3434

35-
impl<'s, B, S> InputRecorder<B> for NodesRecorder<'s, B, S>
35+
impl<B, S> InputRecorder<B> for NodesRecorder<'_, B, S>
3636
where
3737
B: Deref<Target = [u8]>,
3838
S: Sink<Match>,
@@ -43,7 +43,7 @@ where
4343
}
4444
}
4545

46-
impl<'s, B, S> Recorder<B> for NodesRecorder<'s, B, S>
46+
impl<B, S> Recorder<B> for NodesRecorder<'_, B, S>
4747
where
4848
B: Deref<Target = [u8]>,
4949
S: Sink<Match>,
@@ -330,7 +330,7 @@ struct PartialNode {
330330
ty: MatchedNodeType,
331331
}
332332

333-
impl<'s, B, S> StackRecorder<'s, B, S>
333+
impl<B, S> StackRecorder<'_, B, S>
334334
where
335335
B: Deref<Target = [u8]>,
336336
S: Sink<Match>,

crates/rsonpath-lib/tests/input_implementation_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ struct ResultInput {
400400

401401
struct ReadBytes<'a>(&'a [u8], usize);
402402

403-
impl<'a> Read for ReadBytes<'a> {
403+
impl Read for ReadBytes<'_> {
404404
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
405405
let rem = self.0.len() - self.1;
406406
if rem > 0 {

crates/rsonpath/src/runner.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct Runner<'q, S> {
2424
pub with_output: ResolvedOutput,
2525
}
2626

27-
impl<'q, S: AsRef<str>> Runner<'q, S> {
27+
impl<S: AsRef<str>> Runner<'_, S> {
2828
pub fn run(self) -> Result<()> {
2929
match self.with_engine {
3030
ResolvedEngine::Main => {

0 commit comments

Comments
 (0)