Skip to content

Commit 27d1272

Browse files
committed
style: fix anonymous lifetime syntax
1 parent e4ed350 commit 27d1272

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
cargo update --package tokio-util --precise 0.7.11
9595
cargo update --package hashbrown --precise 0.15.0
9696
cargo update --package once_cell --precise 1.20.3
97+
cargo update --package tracing-core --precise 0.1.33
9798
9899
99100
- run: cargo check -p h2

src/hpack/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl Header {
118118
}
119119

120120
/// Returns the header name
121-
pub fn name(&self) -> Name {
121+
pub fn name(&self) -> Name<'_> {
122122
match *self {
123123
Header::Field { ref name, .. } => Name::Field(name),
124124
Header::Authority(..) => Name::Authority,

src/proto/streams/store.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub(super) struct VacantEntry<'a> {
7474
}
7575

7676
pub(super) trait Resolve {
77-
fn resolve(&mut self, key: Key) -> Ptr;
77+
fn resolve(&mut self, key: Key) -> Ptr<'_>;
7878
}
7979

8080
// ===== impl Store =====
@@ -87,7 +87,7 @@ impl Store {
8787
}
8888
}
8989

90-
pub fn find_mut(&mut self, id: &StreamId) -> Option<Ptr> {
90+
pub fn find_mut(&mut self, id: &StreamId) -> Option<Ptr<'_>> {
9191
let index = match self.ids.get(id) {
9292
Some(key) => *key,
9393
None => return None,
@@ -102,7 +102,7 @@ impl Store {
102102
})
103103
}
104104

105-
pub fn insert(&mut self, id: StreamId, val: Stream) -> Ptr {
105+
pub fn insert(&mut self, id: StreamId, val: Stream) -> Ptr<'_> {
106106
let index = SlabIndex(self.slab.insert(val) as u32);
107107
assert!(self.ids.insert(id, index).is_none());
108108

@@ -115,7 +115,7 @@ impl Store {
115115
}
116116
}
117117

118-
pub fn find_entry(&mut self, id: StreamId) -> Entry {
118+
pub fn find_entry(&mut self, id: StreamId) -> Entry<'_> {
119119
use self::indexmap::map::Entry::*;
120120

121121
match self.ids.entry(id) {
@@ -177,7 +177,7 @@ impl Store {
177177
}
178178

179179
impl Resolve for Store {
180-
fn resolve(&mut self, key: Key) -> Ptr {
180+
fn resolve(&mut self, key: Key) -> Ptr<'_> {
181181
Ptr { key, store: self }
182182
}
183183
}
@@ -412,7 +412,7 @@ impl<'a> Ptr<'a> {
412412
}
413413

414414
impl<'a> Resolve for Ptr<'a> {
415-
fn resolve(&mut self, key: Key) -> Ptr {
415+
fn resolve(&mut self, key: Key) -> Ptr<'_> {
416416
Ptr {
417417
key,
418418
store: &mut *self.store,

src/proto/streams/streams.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ impl<B, P> Streams<B, P>
980980
where
981981
P: Peer,
982982
{
983-
pub fn as_dyn(&self) -> DynStreams<B> {
983+
pub fn as_dyn(&self) -> DynStreams<'_, B> {
984984
let Self {
985985
inner,
986986
send_buffer,

0 commit comments

Comments
 (0)