chore: Fix warnings for Rust 1.89 (#32378)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
4ff41ba62e
commit
72bcb0beb7
32 changed files with 102 additions and 95 deletions
|
@ -53,7 +53,7 @@ impl Chunk {
|
|||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn as_slice(&self) -> ChunkSlice {
|
||||
pub fn as_slice(&self) -> ChunkSlice<'_> {
|
||||
ChunkSlice {
|
||||
chars: self.chars,
|
||||
chars_utf16: self.chars_utf16,
|
||||
|
@ -64,7 +64,7 @@ impl Chunk {
|
|||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn slice(&self, range: Range<usize>) -> ChunkSlice {
|
||||
pub fn slice(&self, range: Range<usize>) -> ChunkSlice<'_> {
|
||||
self.as_slice().slice(range)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ impl Rope {
|
|||
self.chunks.extent(&())
|
||||
}
|
||||
|
||||
pub fn cursor(&self, offset: usize) -> Cursor {
|
||||
pub fn cursor(&self, offset: usize) -> Cursor<'_> {
|
||||
Cursor::new(self, offset)
|
||||
}
|
||||
|
||||
|
@ -258,23 +258,23 @@ impl Rope {
|
|||
.flat_map(|chunk| chunk.chars().rev())
|
||||
}
|
||||
|
||||
pub fn bytes_in_range(&self, range: Range<usize>) -> Bytes {
|
||||
pub fn bytes_in_range(&self, range: Range<usize>) -> Bytes<'_> {
|
||||
Bytes::new(self, range, false)
|
||||
}
|
||||
|
||||
pub fn reversed_bytes_in_range(&self, range: Range<usize>) -> Bytes {
|
||||
pub fn reversed_bytes_in_range(&self, range: Range<usize>) -> Bytes<'_> {
|
||||
Bytes::new(self, range, true)
|
||||
}
|
||||
|
||||
pub fn chunks(&self) -> Chunks {
|
||||
pub fn chunks(&self) -> Chunks<'_> {
|
||||
self.chunks_in_range(0..self.len())
|
||||
}
|
||||
|
||||
pub fn chunks_in_range(&self, range: Range<usize>) -> Chunks {
|
||||
pub fn chunks_in_range(&self, range: Range<usize>) -> Chunks<'_> {
|
||||
Chunks::new(self, range, false)
|
||||
}
|
||||
|
||||
pub fn reversed_chunks_in_range(&self, range: Range<usize>) -> Chunks {
|
||||
pub fn reversed_chunks_in_range(&self, range: Range<usize>) -> Chunks<'_> {
|
||||
Chunks::new(self, range, true)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue