chore: Fix violations of elided_named_lifetimes
(#18330)
I compile Zed from nightly build pretty often and I've noticed that we're getting a few hits on new rustc lint: https://github.com/rust-lang/rust/pull/129207 Release Notes: - N/A
This commit is contained in:
parent
9d197ddc99
commit
a6cb17fb51
7 changed files with 10 additions and 10 deletions
|
@ -69,7 +69,7 @@ impl CreaseSnapshot {
|
||||||
&'a self,
|
&'a self,
|
||||||
range: Range<MultiBufferRow>,
|
range: Range<MultiBufferRow>,
|
||||||
snapshot: &'a MultiBufferSnapshot,
|
snapshot: &'a MultiBufferSnapshot,
|
||||||
) -> impl '_ + Iterator<Item = &'a Crease> {
|
) -> impl 'a + Iterator<Item = &'a Crease> {
|
||||||
let start = snapshot.anchor_before(Point::new(range.start.0, 0));
|
let start = snapshot.anchor_before(Point::new(range.start.0, 0));
|
||||||
let mut cursor = self.creases.cursor::<ItemSummary>(snapshot);
|
let mut cursor = self.creases.cursor::<ItemSummary>(snapshot);
|
||||||
cursor.seek(&start, Bias::Left, snapshot);
|
cursor.seek(&start, Bias::Left, snapshot);
|
||||||
|
|
|
@ -11515,7 +11515,7 @@ impl Editor {
|
||||||
&'a self,
|
&'a self,
|
||||||
position: Anchor,
|
position: Anchor,
|
||||||
buffer: &'a MultiBufferSnapshot,
|
buffer: &'a MultiBufferSnapshot,
|
||||||
) -> impl 'a + Iterator<Item = &Range<Anchor>> {
|
) -> impl 'a + Iterator<Item = &'a Range<Anchor>> {
|
||||||
let read_highlights = self
|
let read_highlights = self
|
||||||
.background_highlights
|
.background_highlights
|
||||||
.get(&TypeId::of::<DocumentHighlightRead>())
|
.get(&TypeId::of::<DocumentHighlightRead>())
|
||||||
|
|
|
@ -794,7 +794,7 @@ impl SyntaxSnapshot {
|
||||||
range: Range<usize>,
|
range: Range<usize>,
|
||||||
buffer: &'a BufferSnapshot,
|
buffer: &'a BufferSnapshot,
|
||||||
query: fn(&Grammar) -> Option<&Query>,
|
query: fn(&Grammar) -> Option<&Query>,
|
||||||
) -> SyntaxMapCaptures {
|
) -> SyntaxMapCaptures<'a> {
|
||||||
SyntaxMapCaptures::new(
|
SyntaxMapCaptures::new(
|
||||||
range.clone(),
|
range.clone(),
|
||||||
buffer.as_rope(),
|
buffer.as_rope(),
|
||||||
|
@ -808,7 +808,7 @@ impl SyntaxSnapshot {
|
||||||
range: Range<usize>,
|
range: Range<usize>,
|
||||||
buffer: &'a BufferSnapshot,
|
buffer: &'a BufferSnapshot,
|
||||||
query: fn(&Grammar) -> Option<&Query>,
|
query: fn(&Grammar) -> Option<&Query>,
|
||||||
) -> SyntaxMapMatches {
|
) -> SyntaxMapMatches<'a> {
|
||||||
SyntaxMapMatches::new(
|
SyntaxMapMatches::new(
|
||||||
range.clone(),
|
range.clone(),
|
||||||
buffer.as_rope(),
|
buffer.as_rope(),
|
||||||
|
@ -828,7 +828,7 @@ impl SyntaxSnapshot {
|
||||||
range: Range<T>,
|
range: Range<T>,
|
||||||
buffer: &'a BufferSnapshot,
|
buffer: &'a BufferSnapshot,
|
||||||
include_hidden: bool,
|
include_hidden: bool,
|
||||||
) -> impl 'a + Iterator<Item = SyntaxLayer> {
|
) -> impl 'a + Iterator<Item = SyntaxLayer<'a>> {
|
||||||
let start_offset = range.start.to_offset(buffer);
|
let start_offset = range.start.to_offset(buffer);
|
||||||
let end_offset = range.end.to_offset(buffer);
|
let end_offset = range.end.to_offset(buffer);
|
||||||
let start = buffer.anchor_before(start_offset);
|
let start = buffer.anchor_before(start_offset);
|
||||||
|
|
|
@ -3954,7 +3954,7 @@ impl Project {
|
||||||
pub fn supplementary_language_servers<'a>(
|
pub fn supplementary_language_servers<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
cx: &'a AppContext,
|
cx: &'a AppContext,
|
||||||
) -> impl '_ + Iterator<Item = (LanguageServerId, LanguageServerName)> {
|
) -> impl 'a + Iterator<Item = (LanguageServerId, LanguageServerName)> {
|
||||||
self.lsp_store.read(cx).supplementary_language_servers()
|
self.lsp_store.read(cx).supplementary_language_servers()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -345,7 +345,7 @@ impl<T: Item> SumTree<T> {
|
||||||
Iter::new(self)
|
Iter::new(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cursor<'a, S>(&'a self, cx: &<T::Summary as Summary>::Context) -> Cursor<T, S>
|
pub fn cursor<'a, S>(&'a self, cx: &<T::Summary as Summary>::Context) -> Cursor<'a, T, S>
|
||||||
where
|
where
|
||||||
S: Dimension<'a, T::Summary>,
|
S: Dimension<'a, T::Summary>,
|
||||||
{
|
{
|
||||||
|
@ -358,7 +358,7 @@ impl<T: Item> SumTree<T> {
|
||||||
&'a self,
|
&'a self,
|
||||||
cx: &<T::Summary as Summary>::Context,
|
cx: &<T::Summary as Summary>::Context,
|
||||||
filter_node: F,
|
filter_node: F,
|
||||||
) -> FilterCursor<F, T, U>
|
) -> FilterCursor<'a, F, T, U>
|
||||||
where
|
where
|
||||||
F: FnMut(&T::Summary) -> bool,
|
F: FnMut(&T::Summary) -> bool,
|
||||||
U: Dimension<'a, T::Summary>,
|
U: Dimension<'a, T::Summary>,
|
||||||
|
|
|
@ -105,7 +105,7 @@ impl<K: Clone + Ord, V: Clone> TreeMap<K, V> {
|
||||||
cursor.item().map(|item| (&item.key, &item.value))
|
cursor.item().map(|item| (&item.key, &item.value))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn iter_from<'a>(&'a self, from: &'a K) -> impl Iterator<Item = (&K, &V)> + '_ {
|
pub fn iter_from<'a>(&'a self, from: &'a K) -> impl Iterator<Item = (&'a K, &'a V)> + 'a {
|
||||||
let mut cursor = self.0.cursor::<MapKeyRef<'_, K>>(&());
|
let mut cursor = self.0.cursor::<MapKeyRef<'_, K>>(&());
|
||||||
let from_key = MapKeyRef(Some(from));
|
let from_key = MapKeyRef(Some(from));
|
||||||
cursor.seek(&from_key, Bias::Left, &());
|
cursor.seek(&from_key, Bias::Left, &());
|
||||||
|
|
|
@ -2119,7 +2119,7 @@ impl Workspace {
|
||||||
pub fn items<'a>(
|
pub fn items<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
cx: &'a AppContext,
|
cx: &'a AppContext,
|
||||||
) -> impl 'a + Iterator<Item = &Box<dyn ItemHandle>> {
|
) -> impl 'a + Iterator<Item = &'a Box<dyn ItemHandle>> {
|
||||||
self.panes.iter().flat_map(|pane| pane.read(cx).items())
|
self.panes.iter().flat_map(|pane| pane.read(cx).items())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue