History

Rust 1.85 (#25272)

Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ... ---------

Piotr Osiewicz committed 1 year ago

Commit e4e758d1 parent fc52b4368 files · +180 −190Browse files

Showing the changes to crates/multi_buffer/src/multi_buffer.rs (1 of 68 files). Show all

Unified · Split

crates/multi_buffer/src/multi_buffer.rs+11−11
@@ -6896,7 +6896,7 @@ impl<'a> sum_tree::Dimension<'a, ExcerptSummary> for ExcerptOffset { · 6895 unmodified lines
6896 }6896 }
6897}6897}
6898 6898
6899impl<'a> sum_tree::SeekTarget<'a, ExcerptSummary, ExcerptSummary> for ExcerptOffset {6899impl sum_tree::SeekTarget<'_, ExcerptSummary, ExcerptSummary> for ExcerptOffset {
6900 fn cmp(&self, cursor_location: &ExcerptSummary, _: &()) -> cmp::Ordering {6900 fn cmp(&self, cursor_location: &ExcerptSummary, _: &()) -> cmp::Ordering {
6901 Ord::cmp(&self.value, &cursor_location.text.len)6901 Ord::cmp(&self.value, &cursor_location.text.len)
6902 }6902 }
@@ -6908,7 +6908,7 @@ impl<'a> sum_tree::SeekTarget<'a, ExcerptSummary, Option<&'a Locator>> for Locat · 5 unmodified lines
6908 }6908 }
6909}6909}
6910 6910
6911impl<'a> sum_tree::SeekTarget<'a, ExcerptSummary, ExcerptSummary> for Locator {6911impl sum_tree::SeekTarget<'_, ExcerptSummary, ExcerptSummary> for Locator {
6912 fn cmp(&self, cursor_location: &ExcerptSummary, _: &()) -> cmp::Ordering {6912 fn cmp(&self, cursor_location: &ExcerptSummary, _: &()) -> cmp::Ordering {
6913 Ord::cmp(self, &cursor_location.excerpt_locator)6913 Ord::cmp(self, &cursor_location.excerpt_locator)
6914 }6914 }
@@ -6982,16 +6982,16 @@ impl<'a> sum_tree::Dimension<'a, DiffTransformSummary> for ExcerptPoint { · 67 unmodified lines
6982 }6982 }
6983}6983}
6984 6984
6985impl<'a, D: TextDimension + Ord>6985impl<D: TextDimension + Ord> sum_tree::SeekTarget<'_, DiffTransformSummary, DiffTransformSummary>
6986 sum_tree::SeekTarget<'a, DiffTransformSummary, DiffTransformSummary> for ExcerptDimension<D>6986 for ExcerptDimension<D>
6987{6987{
6988 fn cmp(&self, cursor_location: &DiffTransformSummary, _: &()) -> cmp::Ordering {6988 fn cmp(&self, cursor_location: &DiffTransformSummary, _: &()) -> cmp::Ordering {
6989 Ord::cmp(&self.0, &D::from_text_summary(&cursor_location.input))6989 Ord::cmp(&self.0, &D::from_text_summary(&cursor_location.input))
6990 }6990 }
6991}6991}
6992 6992
6993impl<'a, D: TextDimension + Ord>6993impl<D: TextDimension + Ord>
6994 sum_tree::SeekTarget<'a, DiffTransformSummary, (OutputDimension<D>, ExcerptDimension<D>)>6994 sum_tree::SeekTarget<'_, DiffTransformSummary, (OutputDimension<D>, ExcerptDimension<D>)>
6995 for ExcerptDimension<D>6995 for ExcerptDimension<D>
6996{6996{
6997 fn cmp(6997 fn cmp(
@@ -7053,14 +7053,14 @@ impl<'a> sum_tree::Dimension<'a, DiffTransformSummary> for Point { · 55 unmodified lines
7053 }7053 }
7054}7054}
7055 7055
7056impl<'a> MultiBufferRows<'a> {7056impl MultiBufferRows<'_> {
7057 pub fn seek(&mut self, MultiBufferRow(row): MultiBufferRow) {7057 pub fn seek(&mut self, MultiBufferRow(row): MultiBufferRow) {
7058 self.point = Point::new(row, 0);7058 self.point = Point::new(row, 0);
7059 self.cursor.seek(&self.point);7059 self.cursor.seek(&self.point);
7060 }7060 }
7061}7061}
7062 7062
7063impl<'a> Iterator for MultiBufferRows<'a> {7063impl Iterator for MultiBufferRows<'_> {
7064 type Item = RowInfo;7064 type Item = RowInfo;
7065 7065
7066 fn next(&mut self) -> Option<Self::Item> {7066 fn next(&mut self) -> Option<Self::Item> {
@@ -7304,7 +7304,7 @@ impl<'a> Iterator for MultiBufferChunks<'a> { · 237 unmodified lines
7304 }7304 }
7305}7305}
7306 7306
7307impl<'a> MultiBufferBytes<'a> {7307impl MultiBufferBytes<'_> {
7308 fn consume(&mut self, len: usize) {7308 fn consume(&mut self, len: usize) {
7309 self.range.start += len;7309 self.range.start += len;
7310 self.chunk = &self.chunk[len..];7310 self.chunk = &self.chunk[len..];
@@ -7351,7 +7351,7 @@ impl<'a> Iterator for MultiBufferBytes<'a> { · 40 unmodified lines
7351 }7351 }
7352}7352}
7353 7353
7354impl<'a> io::Read for MultiBufferBytes<'a> {7354impl io::Read for MultiBufferBytes<'_> {
7355 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {7355 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
7356 let len = cmp::min(buf.len(), self.chunk.len());7356 let len = cmp::min(buf.len(), self.chunk.len());
7357 buf[..len].copy_from_slice(&self.chunk[..len]);7357 buf[..len].copy_from_slice(&self.chunk[..len]);
@@ -7362,7 +7362,7 @@ impl<'a> io::Read for MultiBufferBytes<'a> { · 4 unmodified lines
7362 }7362 }
7363}7363}
7364 7364
7365impl<'a> io::Read for ReversedMultiBufferBytes<'a> {7365impl io::Read for ReversedMultiBufferBytes<'_> {
7366 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {7366 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
7367 let len = cmp::min(buf.len(), self.chunk.len());7367 let len = cmp::min(buf.len(), self.chunk.len());
7368 buf[..len].copy_from_slice(&self.chunk[..len]);7368 buf[..len].copy_from_slice(&self.chunk[..len]);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t