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

Unified · Split

68 files
  1. .github/workflows/ci.yml +1 −1
  2. Cargo.toml +3 −0
  3. crates/buffer_diff/src/buffer_diff.rs +1 −1
  4. crates/channel/src/channel_store/channel_index.rs +2 −2
  5. crates/collab/src/db/queries/extensions.rs +1 −1
  6. crates/collab/src/rpc.rs +3 −3
  7. crates/collab_ui/src/panel_settings.rs +1 −1
  8. crates/copilot/src/copilot_chat.rs +1 −1
  9. crates/editor/src/display_map/block_map.rs +7 −7
  10. crates/editor/src/display_map/fold_map.rs +5 −5
  11. crates/editor/src/display_map/inlay_map.rs +3 −3
  12. crates/editor/src/display_map/tab_map.rs +1 −1
  13. crates/editor/src/display_map/wrap_map.rs +4 −4
  14. crates/editor/src/editor.rs +1 −1
  15. crates/editor/src/editor_settings.rs +1 −1
  16. crates/editor/src/movement.rs +1 −1
  17. crates/editor/src/selections_collection.rs +2 −2
  18. crates/extension_api/src/extension_api.rs +4 −1
  19. crates/extension_host/src/headless_host.rs +2 −3
  20. crates/extension_host/src/wasm_host/wit.rs +2 −2
  21. crates/file_finder/src/file_finder.rs +4 −4
  22. crates/file_finder/src/new_path_prompt.rs +7 −7
  23. crates/fs/src/fs.rs +1 −1
  24. crates/fuzzy/src/paths.rs +1 −1
  25. crates/fuzzy/src/strings.rs +1 −1
  26. crates/git/src/blame.rs +1 −1
  27. crates/git/src/repository.rs +1 −1
  28. crates/git_ui/src/git_panel.rs +1 −1
  29. crates/gpui/src/app.rs +2 −2
  30. crates/gpui/src/app/context.rs +2 −2
  31. crates/gpui/src/app/entity_map.rs +3 −3
  32. crates/gpui/src/color.rs +2 −2
  33. crates/gpui/src/elements/list.rs +2 −2
  34. crates/gpui/src/executor.rs +1 −1
  35. crates/gpui/src/platform/mac/attributed_string.rs +0 −1
  36. crates/gpui/src/platform/mac/dispatcher.rs +1 −1
  37. crates/gpui/src/platform/windows/window.rs +3 −3
  38. crates/gpui/src/text_system.rs +9 −0
  39. crates/gpui/src/text_system/line_layout.rs +4 −4
  40. crates/gpui/src/text_system/line_wrapper.rs +0 −8
  41. crates/gpui/src/util.rs +1 −1
  42. crates/gpui/src/window.rs +0 −2
  43. crates/http_client/src/http_client.rs +2 −2
  44. crates/language/src/buffer.rs +3 −3
  45. crates/language/src/syntax_map.rs +9 −11
  46. crates/language_extension/src/extension_lsp_adapter.rs +1 −7
  47. crates/language_model/src/model/cloud_model.rs +2 −2
  48. crates/languages/src/python.rs +1 −1
  49. crates/multi_buffer/src/multi_buffer.rs +11 −11
  50. crates/notifications/src/notification_store.rs +2 −2
  51. crates/project/src/buffer_store.rs +2 −2
  52. crates/rope/src/chunk.rs +1 −1
  53. crates/rope/src/point.rs +2 −2
  54. crates/rope/src/point_utf16.rs +2 −2
  55. crates/rope/src/rope.rs +3 −3
  56. crates/search/src/buffer_search.rs +1 −1
  57. crates/settings/src/json_schema.rs +1 −1
  58. crates/sqlez/src/statement.rs +1 −1
  59. crates/sum_tree/src/cursor.rs +4 −4
  60. crates/sum_tree/src/sum_tree.rs +4 −4
  61. crates/sum_tree/src/tree_map.rs +1 −1
  62. crates/terminal/src/pty_info.rs +1 −4
  63. crates/text/src/operation_queue.rs +2 −2
  64. crates/text/src/text.rs +6 −6
  65. crates/util/src/arc_cow.rs +8 −8
  66. crates/util/src/util.rs +1 −1
  67. crates/worktree/src/worktree.rs +15 −17
  68. rust-toolchain.toml +1 −1
.github/workflows/ci.yml+1−1
@@ -240,7 +240,7 @@ jobs: · 239 unmodified lines
240 timeout-minutes: 60240 timeout-minutes: 60
241 name: (Windows) Run Clippy and tests241 name: (Windows) Run Clippy and tests
242 if: github.repository_owner == 'zed-industries'242 if: github.repository_owner == 'zed-industries'
243 runs-on: hosted-windows-1243 runs-on: hosted-windows-2
244 steps:244 steps:
245 # more info here:- https://github.com/rust-lang/cargo/issues/13020245 # more info here:- https://github.com/rust-lang/cargo/issues/13020
246 - name: Enable longer pathnames for git246 - name: Enable longer pathnames for git
Cargo.toml+3−0
@@ -709,6 +709,9 @@ debug = "full" · 708 unmodified lines
709lto = false709lto = false
710codegen-units = 16710codegen-units = 16
711 711
712[workspace.lints.rust]
713unexpected_cfgs = { level = "allow" }
714
712[workspace.lints.clippy]715[workspace.lints.clippy]
713dbg_macro = "deny"716dbg_macro = "deny"
714todo = "deny"717todo = "deny"
crates/buffer_diff/src/buffer_diff.rs+1−1
@@ -109,7 +109,7 @@ impl sum_tree::Summary for DiffHunkSummary { · 108 unmodified lines
109 }109 }
110}110}
111 111
112impl<'a> sum_tree::SeekTarget<'a, DiffHunkSummary, DiffHunkSummary> for Anchor {112impl sum_tree::SeekTarget<'_, DiffHunkSummary, DiffHunkSummary> for Anchor {
113 fn cmp(&self, cursor_location: &DiffHunkSummary, buffer: &text::BufferSnapshot) -> Ordering {113 fn cmp(&self, cursor_location: &DiffHunkSummary, buffer: &text::BufferSnapshot) -> Ordering {
114 if self114 if self
115 .cmp(&cursor_location.buffer_range.start, buffer)115 .cmp(&cursor_location.buffer_range.start, buffer)
crates/channel/src/channel_store/channel_index.rs+2−2
@@ -48,7 +48,7 @@ pub struct ChannelPathsInsertGuard<'a> { · 47 unmodified lines
48 channels_by_id: &'a mut BTreeMap<ChannelId, Arc<Channel>>,48 channels_by_id: &'a mut BTreeMap<ChannelId, Arc<Channel>>,
49}49}
50 50
51impl<'a> ChannelPathsInsertGuard<'a> {51impl ChannelPathsInsertGuard<'_> {
52 pub fn insert(&mut self, channel_proto: proto::Channel) -> bool {52 pub fn insert(&mut self, channel_proto: proto::Channel) -> bool {
53 let mut ret = false;53 let mut ret = false;
54 let parent_path = channel_proto54 let parent_path = channel_proto
@@ -86,7 +86,7 @@ impl<'a> ChannelPathsInsertGuard<'a> { · 31 unmodified lines
86 }86 }
87}87}
88 88
89impl<'a> Drop for ChannelPathsInsertGuard<'a> {89impl Drop for ChannelPathsInsertGuard<'_> {
90 fn drop(&mut self) {90 fn drop(&mut self) {
91 self.channels_ordered.sort_by(|a, b| {91 self.channels_ordered.sort_by(|a, b| {
92 let a = channel_path_sorting_key(*a, self.channels_by_id);92 let a = channel_path_sorting_key(*a, self.channels_by_id);
crates/collab/src/db/queries/extensions.rs+1−1
@@ -202,7 +202,7 @@ impl Database { · 201 unmodified lines
202 .await202 .await
203 }203 }
204 204
205 pub async fn get_known_extension_versions<'a>(&self) -> Result<HashMap<String, Vec<String>>> {205 pub async fn get_known_extension_versions(&self) -> Result<HashMap<String, Vec<String>>> {
206 self.transaction(|tx| async move {206 self.transaction(|tx| async move {
207 let mut extension_external_ids_by_id = HashMap::default();207 let mut extension_external_ids_by_id = HashMap::default();
208 208
crates/collab/src/rpc.rs+3−3
@@ -975,7 +975,7 @@ impl Server { · 974 unmodified lines
975 }975 }
976}976}
977 977
978impl<'a> Deref for ConnectionPoolGuard<'a> {978impl Deref for ConnectionPoolGuard<'_> {
979 type Target = ConnectionPool;979 type Target = ConnectionPool;
980 980
981 fn deref(&self) -> &Self::Target {981 fn deref(&self) -> &Self::Target {
@@ -983,13 +983,13 @@ impl<'a> Deref for ConnectionPoolGuard<'a> { · 1 unmodified line
983 }983 }
984}984}
985 985
986impl<'a> DerefMut for ConnectionPoolGuard<'a> {986impl DerefMut for ConnectionPoolGuard<'_> {
987 fn deref_mut(&mut self) -> &mut Self::Target {987 fn deref_mut(&mut self) -> &mut Self::Target {
988 &mut self.guard988 &mut self.guard
989 }989 }
990}990}
991 991
992impl<'a> Drop for ConnectionPoolGuard<'a> {992impl Drop for ConnectionPoolGuard<'_> {
993 fn drop(&mut self) {993 fn drop(&mut self) {
994 #[cfg(test)]994 #[cfg(test)]
995 self.check_invariants();995 self.check_invariants();
crates/collab_ui/src/panel_settings.rs+1−1
@@ -27,7 +27,7 @@ impl<'de> Deserialize<'de> for ChatPanelButton { · 26 unmodified lines
27 {27 {
28 struct Visitor;28 struct Visitor;
29 29
30 impl<'de> serde::de::Visitor<'de> for Visitor {30 impl serde::de::Visitor<'_> for Visitor {
31 type Value = ChatPanelButton;31 type Value = ChatPanelButton;
32 32
33 fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {33 fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
crates/copilot/src/copilot_chat.rs+1−1
@@ -411,7 +411,7 @@ async fn stream_completion( · 410 unmodified lines
411 411
412 match serde_json::from_str::<ResponseEvent>(line) {412 match serde_json::from_str::<ResponseEvent>(line) {
413 Ok(response) => {413 Ok(response) => {
414 if response.choices.first().is_none()414 if response.choices.is_empty()
415 || response.choices.first().unwrap().finish_reason.is_some()415 || response.choices.first().unwrap().finish_reason.is_some()
416 {416 {
417 None417 None
crates/editor/src/display_map/block_map.rs+7−7
@@ -999,7 +999,7 @@ impl std::ops::DerefMut for BlockPoint { · 998 unmodified lines
999 }999 }
1000}1000}
1001 1001
1002impl<'a> Deref for BlockMapReader<'a> {1002impl Deref for BlockMapReader<'_> {
1003 type Target = BlockSnapshot;1003 type Target = BlockSnapshot;
1004 1004
1005 fn deref(&self) -> &Self::Target {1005 fn deref(&self) -> &Self::Target {
@@ -1007,13 +1007,13 @@ impl<'a> Deref for BlockMapReader<'a> { · 1 unmodified line
1007 }1007 }
1008}1008}
1009 1009
1010impl<'a> DerefMut for BlockMapReader<'a> {1010impl DerefMut for BlockMapReader<'_> {
1011 fn deref_mut(&mut self) -> &mut Self::Target {1011 fn deref_mut(&mut self) -> &mut Self::Target {
1012 &mut self.snapshot1012 &mut self.snapshot
1013 }1013 }
1014}1014}
1015 1015
1016impl<'a> BlockMapReader<'a> {1016impl BlockMapReader<'_> {
1017 pub fn row_for_block(&self, block_id: CustomBlockId) -> Option<BlockRow> {1017 pub fn row_for_block(&self, block_id: CustomBlockId) -> Option<BlockRow> {
1018 let block = self.blocks.iter().find(|block| block.id == block_id)?;1018 let block = self.blocks.iter().find(|block| block.id == block_id)?;
1019 let buffer_row = block1019 let buffer_row = block
@@ -1053,7 +1053,7 @@ impl<'a> BlockMapReader<'a> { · 33 unmodified lines
1053 }1053 }
1054}1054}
1055 1055
1056impl<'a> BlockMapWriter<'a> {1056impl BlockMapWriter<'_> {
1057 pub fn insert(1057 pub fn insert(
1058 &mut self,1058 &mut self,
1059 blocks: impl IntoIterator<Item = BlockProperties<Anchor>>,1059 blocks: impl IntoIterator<Item = BlockProperties<Anchor>>,
@@ -1740,7 +1740,7 @@ impl BlockSnapshot { · 680 unmodified lines
1740 }1740 }
1741}1741}
1742 1742
1743impl<'a> BlockChunks<'a> {1743impl BlockChunks<'_> {
1744 /// Go to the next transform1744 /// Go to the next transform
1745 fn advance(&mut self) {1745 fn advance(&mut self) {
1746 self.input_chunk = Chunk::default();1746 self.input_chunk = Chunk::default();
@@ -1856,7 +1856,7 @@ impl<'a> Iterator for BlockChunks<'a> { · 109 unmodified lines
1856 }1856 }
1857}1857}
1858 1858
1859impl<'a> Iterator for BlockRows<'a> {1859impl Iterator for BlockRows<'_> {
1860 type Item = RowInfo;1860 type Item = RowInfo;
1861 1861
1862 fn next(&mut self) -> Option<Self::Item> {1862 fn next(&mut self) -> Option<Self::Item> {
@@ -1952,7 +1952,7 @@ impl<'a> sum_tree::Dimension<'a, TransformSummary> for BlockRow { · 89 unmodified lines
1952 }1952 }
1953}1953}
1954 1954
1955impl<'a> Deref for BlockContext<'a, '_> {1955impl Deref for BlockContext<'_, '_> {
1956 type Target = App;1956 type Target = App;
1957 1957
1958 fn deref(&self) -> &Self::Target {1958 fn deref(&self) -> &Self::Target {
crates/editor/src/display_map/fold_map.rs+5−5
@@ -132,7 +132,7 @@ impl<'a> sum_tree::Dimension<'a, TransformSummary> for FoldPoint { · 131 unmodified lines
132 132
133pub(crate) struct FoldMapWriter<'a>(&'a mut FoldMap);133pub(crate) struct FoldMapWriter<'a>(&'a mut FoldMap);
134 134
135impl<'a> FoldMapWriter<'a> {135impl FoldMapWriter<'_> {
136 pub(crate) fn fold<T: ToOffset>(136 pub(crate) fn fold<T: ToOffset>(
137 &mut self,137 &mut self,
138 ranges: impl IntoIterator<Item = (Range<T>, FoldPlaceholder)>,138 ranges: impl IntoIterator<Item = (Range<T>, FoldPlaceholder)>,
@@ -1121,7 +1121,7 @@ impl<'a> sum_tree::Dimension<'a, FoldSummary> for FoldRange { · 982 unmodified lines
1121 }1121 }
1122}1122}
1123 1123
1124impl<'a> sum_tree::SeekTarget<'a, FoldSummary, FoldRange> for FoldRange {1124impl sum_tree::SeekTarget<'_, FoldSummary, FoldRange> for FoldRange {
1125 fn cmp(&self, other: &Self, buffer: &MultiBufferSnapshot) -> Ordering {1125 fn cmp(&self, other: &Self, buffer: &MultiBufferSnapshot) -> Ordering {
1126 AnchorRangeExt::cmp(&self.0, &other.0, buffer)1126 AnchorRangeExt::cmp(&self.0, &other.0, buffer)
1127 }1127 }
@@ -1144,7 +1144,7 @@ pub struct FoldRows<'a> { · 16 unmodified lines
1144 fold_point: FoldPoint,1144 fold_point: FoldPoint,
1145}1145}
1146 1146
1147impl<'a> FoldRows<'a> {1147impl FoldRows<'_> {
1148 pub(crate) fn seek(&mut self, row: u32) {1148 pub(crate) fn seek(&mut self, row: u32) {
1149 let fold_point = FoldPoint::new(row, 0);1149 let fold_point = FoldPoint::new(row, 0);
1150 self.cursor.seek(&fold_point, Bias::Left, &());1150 self.cursor.seek(&fold_point, Bias::Left, &());
@@ -1155,7 +1155,7 @@ impl<'a> FoldRows<'a> { · 4 unmodified lines
1155 }1155 }
1156}1156}
1157 1157
1158impl<'a> Iterator for FoldRows<'a> {1158impl Iterator for FoldRows<'_> {
1159 type Item = RowInfo;1159 type Item = RowInfo;
1160 1160
1161 fn next(&mut self) -> Option<Self::Item> {1161 fn next(&mut self) -> Option<Self::Item> {
@@ -1190,7 +1190,7 @@ pub struct FoldChunks<'a> { · 28 unmodified lines
1190 max_output_offset: FoldOffset,1190 max_output_offset: FoldOffset,
1191}1191}
1192 1192
1193impl<'a> FoldChunks<'a> {1193impl FoldChunks<'_> {
1194 pub(crate) fn seek(&mut self, range: Range<FoldOffset>) {1194 pub(crate) fn seek(&mut self, range: Range<FoldOffset>) {
1195 self.transform_cursor.seek(&range.start, Bias::Right, &());1195 self.transform_cursor.seek(&range.start, Bias::Right, &());
1196 1196
crates/editor/src/display_map/inlay_map.rs+3−3
@@ -215,7 +215,7 @@ pub struct InlayChunks<'a> { · 214 unmodified lines
215 snapshot: &'a InlaySnapshot,215 snapshot: &'a InlaySnapshot,
216}216}
217 217
218impl<'a> InlayChunks<'a> {218impl InlayChunks<'_> {
219 pub fn seek(&mut self, new_range: Range<InlayOffset>) {219 pub fn seek(&mut self, new_range: Range<InlayOffset>) {
220 self.transforms.seek(&new_range.start, Bias::Right, &());220 self.transforms.seek(&new_range.start, Bias::Right, &());
221 221
@@ -341,7 +341,7 @@ impl<'a> Iterator for InlayChunks<'a> { · 119 unmodified lines
341 }341 }
342}342}
343 343
344impl<'a> InlayBufferRows<'a> {344impl InlayBufferRows<'_> {
345 pub fn seek(&mut self, row: u32) {345 pub fn seek(&mut self, row: u32) {
346 let inlay_point = InlayPoint::new(row, 0);346 let inlay_point = InlayPoint::new(row, 0);
347 self.transforms.seek(&inlay_point, Bias::Left, &());347 self.transforms.seek(&inlay_point, Bias::Left, &());
@@ -363,7 +363,7 @@ impl<'a> InlayBufferRows<'a> { · 15 unmodified lines
363 }363 }
364}364}
365 365
366impl<'a> Iterator for InlayBufferRows<'a> {366impl Iterator for InlayBufferRows<'_> {
367 type Item = RowInfo;367 type Item = RowInfo;
368 368
369 fn next(&mut self) -> Option<Self::Item> {369 fn next(&mut self) -> Option<Self::Item> {
crates/editor/src/display_map/tab_map.rs+1−1
@@ -498,7 +498,7 @@ pub struct TabChunks<'a> { · 497 unmodified lines
498 inside_leading_tab: bool,498 inside_leading_tab: bool,
499}499}
500 500
501impl<'a> TabChunks<'a> {501impl TabChunks<'_> {
502 pub(crate) fn seek(&mut self, range: Range<TabPoint>) {502 pub(crate) fn seek(&mut self, range: Range<TabPoint>) {
503 let (input_start, expanded_char_column, to_next_stop) =503 let (input_start, expanded_char_column, to_next_stop) =
504 self.snapshot.to_fold_point(range.start, Bias::Left);504 self.snapshot.to_fold_point(range.start, Bias::Left);
crates/editor/src/display_map/wrap_map.rs+4−4
@@ -69,7 +69,7 @@ pub struct WrapRows<'a> { · 68 unmodified lines
69 transforms: Cursor<'a, Transform, (WrapPoint, TabPoint)>,69 transforms: Cursor<'a, Transform, (WrapPoint, TabPoint)>,
70}70}
71 71
72impl<'a> WrapRows<'a> {72impl WrapRows<'_> {
73 pub(crate) fn seek(&mut self, start_row: u32) {73 pub(crate) fn seek(&mut self, start_row: u32) {
74 self.transforms74 self.transforms
75 .seek(&WrapPoint::new(start_row, 0), Bias::Left, &());75 .seek(&WrapPoint::new(start_row, 0), Bias::Left, &());
@@ -872,7 +872,7 @@ impl WrapSnapshot { · 796 unmodified lines
872 }872 }
873}873}
874 874
875impl<'a> WrapChunks<'a> {875impl WrapChunks<'_> {
876 pub(crate) fn seek(&mut self, rows: Range<u32>) {876 pub(crate) fn seek(&mut self, rows: Range<u32>) {
877 let output_start = WrapPoint::new(rows.start, 0);877 let output_start = WrapPoint::new(rows.start, 0);
878 let output_end = WrapPoint::new(rows.end, 0);878 let output_end = WrapPoint::new(rows.end, 0);
@@ -955,7 +955,7 @@ impl<'a> Iterator for WrapChunks<'a> { · 76 unmodified lines
955 }955 }
956}956}
957 957
958impl<'a> Iterator for WrapRows<'a> {958impl Iterator for WrapRows<'_> {
959 type Item = RowInfo;959 type Item = RowInfo;
960 960
961 fn next(&mut self) -> Option<Self::Item> {961 fn next(&mut self) -> Option<Self::Item> {
@@ -1120,7 +1120,7 @@ impl<'a> sum_tree::Dimension<'a, TransformSummary> for TabPoint { · 158 unmodified lines
1120 }1120 }
1121}1121}
1122 1122
1123impl<'a> sum_tree::SeekTarget<'a, TransformSummary, TransformSummary> for TabPoint {1123impl sum_tree::SeekTarget<'_, TransformSummary, TransformSummary> for TabPoint {
1124 fn cmp(&self, cursor_location: &TransformSummary, _: &()) -> std::cmp::Ordering {1124 fn cmp(&self, cursor_location: &TransformSummary, _: &()) -> std::cmp::Ordering {
1125 Ord::cmp(&self.0, &cursor_location.input.lines)1125 Ord::cmp(&self.0, &cursor_location.input.lines)
1126 }1126 }
crates/editor/src/editor.rs+1−1
@@ -17393,7 +17393,7 @@ impl Focusable for Editor { · 17392 unmodified lines
17393}17393}
17394 17394
17395impl Render for Editor {17395impl Render for Editor {
17396 fn render<'a>(&mut self, _: &mut Window, cx: &mut Context<'a, Self>) -> impl IntoElement {17396 fn render(&mut self, _: &mut Window, cx: &mut Context<'_, Self>) -> impl IntoElement {
17397 let settings = ThemeSettings::get_global(cx);17397 let settings = ThemeSettings::get_global(cx);
17398 17398
17399 let mut text_style = match self.mode {17399 let mut text_style = match self.mode {
crates/editor/src/editor_settings.rs+1−1
@@ -177,7 +177,7 @@ impl<'de> Deserialize<'de> for ScrollbarDiagnostics { · 176 unmodified lines
177 {177 {
178 struct Visitor;178 struct Visitor;
179 179
180 impl<'de> serde::de::Visitor<'de> for Visitor {180 impl serde::de::Visitor<'_> for Visitor {
181 type Value = ScrollbarDiagnostics;181 type Value = ScrollbarDiagnostics;
182 182
183 fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {183 fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
crates/editor/src/movement.rs+1−1
@@ -238,7 +238,7 @@ pub fn indented_line_beginning( · 237 unmodified lines
238}238}
239 239
240/// Returns a position of the end of line.240/// Returns a position of the end of line.
241 241///
242/// If `stop_at_soft_boundaries` is true, the returned position is that of the242/// If `stop_at_soft_boundaries` is true, the returned position is that of the
243/// displayed line (e.g. it could actually be in the middle of a text line if that line is soft-wrapped).243/// displayed line (e.g. it could actually be in the middle of a text line if that line is soft-wrapped).
244/// Otherwise it's always going to be the end of a logical line.244/// Otherwise it's always going to be the end of a logical line.
crates/editor/src/selections_collection.rs+2−2
@@ -843,14 +843,14 @@ impl<'a> MutableSelectionsCollection<'a> { · 842 unmodified lines
843 }843 }
844}844}
845 845
846impl<'a> Deref for MutableSelectionsCollection<'a> {846impl Deref for MutableSelectionsCollection<'_> {
847 type Target = SelectionsCollection;847 type Target = SelectionsCollection;
848 fn deref(&self) -> &Self::Target {848 fn deref(&self) -> &Self::Target {
849 self.collection849 self.collection
850 }850 }
851}851}
852 852
853impl<'a> DerefMut for MutableSelectionsCollection<'a> {853impl DerefMut for MutableSelectionsCollection<'_> {
854 fn deref_mut(&mut self) -> &mut Self::Target {854 fn deref_mut(&mut self) -> &mut Self::Target {
855 self.collection855 self.collection
856 }856 }
crates/extension_api/src/extension_api.rs+4−1
@@ -181,7 +181,10 @@ pub fn register_extension(build_extension: fn() -> Box<dyn Extension>) { · 180 unmodified lines
181}181}
182 182
183fn extension() -> &'static mut dyn Extension {183fn extension() -> &'static mut dyn Extension {
184 unsafe { EXTENSION.as_deref_mut().unwrap() }184 #[expect(static_mut_refs)]
185 unsafe {
186 EXTENSION.as_deref_mut().unwrap()
187 }
185}188}
186 189
187static mut EXTENSION: Option<Box<dyn Extension>> = None;190static mut EXTENSION: Option<Box<dyn Extension>> = None;
crates/extension_host/src/headless_host.rs+2−3
@@ -78,10 +78,9 @@ impl HeadlessExtensionStore { · 77 unmodified lines
78 if e.dev {78 if e.dev {
79 return true;79 return true;
80 }80 }
81 !self81 self.loaded_extensions
82 .loaded_extensions
83 .get(e.id.as_str())82 .get(e.id.as_str())
84 .is_some_and(|loaded| loaded.as_ref() == e.version.as_str())83 .is_none_or(|loaded| loaded.as_ref() != e.version.as_str())
85 })84 })
86 .collect();85 .collect();
87 86
crates/extension_host/src/wasm_host/wit.rs+2−2
@@ -348,7 +348,7 @@ impl Extension { · 347 unmodified lines
348 .call_labels_for_completions(348 .call_labels_for_completions(
349 store,349 store,
350 &language_server_id.0,350 &language_server_id.0,
351 &completions.into_iter().map(Into::into).collect::<Vec<_>>(),351 &completions.into_iter().collect::<Vec<_>>(),
352 )352 )
353 .await?353 .await?
354 .map(|labels| {354 .map(|labels| {
@@ -402,7 +402,7 @@ impl Extension { · 47 unmodified lines
402 .call_labels_for_symbols(402 .call_labels_for_symbols(
403 store,403 store,
404 &language_server_id.0,404 &language_server_id.0,
405 &symbols.into_iter().map(Into::into).collect::<Vec<_>>(),405 &symbols.into_iter().collect::<Vec<_>>(),
406 )406 )
407 .await?407 .await?
408 .map(|labels| {408 .map(|labels| {
crates/file_finder/src/file_finder.rs+4−4
@@ -1451,9 +1451,9 @@ impl<'a> PathComponentSlice<'a> { · 1450 unmodified lines
1451 matches.next();1451 matches.next();
1452 }1452 }
1453 if is_first_normal || is_last || !is_normal || contains_match {1453 if is_first_normal || is_last || !is_normal || contains_match {
1454 if !longest1454 if longest
1455 .as_ref()1455 .as_ref()
1456 .is_some_and(|old| old.end - old.start > cur.end - cur.start)1456 .is_none_or(|old| old.end - old.start <= cur.end - cur.start)
1457 {1457 {
1458 longest = Some(cur);1458 longest = Some(cur);
1459 }1459 }
@@ -1462,9 +1462,9 @@ impl<'a> PathComponentSlice<'a> { · 2 unmodified lines
1462 cur.end = i + 1;1462 cur.end = i + 1;
1463 }1463 }
1464 }1464 }
1465 if !longest1465 if longest
1466 .as_ref()1466 .as_ref()
1467 .is_some_and(|old| old.end - old.start > cur.end - cur.start)1467 .is_none_or(|old| old.end - old.start <= cur.end - cur.start)
1468 {1468 {
1469 longest = Some(cur);1469 longest = Some(cur);
1470 }1470 }
crates/file_finder/src/new_path_prompt.rs+7−7
@@ -108,7 +108,7 @@ impl Match { · 107 unmodified lines
108 fn styled_text(&self, project: &Project, window: &Window, cx: &App) -> StyledText {108 fn styled_text(&self, project: &Project, window: &Window, cx: &App) -> StyledText {
109 let mut text = "./".to_string();109 let mut text = "./".to_string();
110 let mut highlights = Vec::new();110 let mut highlights = Vec::new();
111 let mut offset = text.as_bytes().len();111 let mut offset = text.len();
112 112
113 let separator = '/';113 let separator = '/';
114 let dir_indicator = "[…]";114 let dir_indicator = "[…]";
@@ -125,7 +125,7 @@ impl Match { · 10 unmodified lines
125 highlights.push((range.start + offset..range.end + offset, style))125 highlights.push((range.start + offset..range.end + offset, style))
126 }126 }
127 text.push(separator);127 text.push(separator);
128 offset = text.as_bytes().len();128 offset = text.len();
129 129
130 if let Some(suffix) = &self.suffix {130 if let Some(suffix) = &self.suffix {
131 text.push_str(suffix);131 text.push_str(suffix);
@@ -140,10 +140,10 @@ impl Match { · 8 unmodified lines
140 Color::Created140 Color::Created
141 };141 };
142 highlights.push((142 highlights.push((
143 offset..offset + suffix.as_bytes().len(),143 offset..offset + suffix.len(),
144 HighlightStyle::color(color.color(cx)),144 HighlightStyle::color(color.color(cx)),
145 ));145 ));
146 offset += suffix.as_bytes().len();146 offset += suffix.len();
147 if entry.is_some_and(|e| e.is_dir()) {147 if entry.is_some_and(|e| e.is_dir()) {
148 text.push(separator);148 text.push(separator);
149 offset += separator.len_utf8();149 offset += separator.len_utf8();
@@ -165,7 +165,7 @@ impl Match { · 15 unmodified lines
165 text.push_str(suffix);165 text.push_str(suffix);
166 let existing_prefix_len = self166 let existing_prefix_len = self
167 .existing_prefix(project, cx)167 .existing_prefix(project, cx)
168 .map(|prefix| prefix.to_string_lossy().as_bytes().len())168 .map(|prefix| prefix.to_string_lossy().len())
169 .unwrap_or(0);169 .unwrap_or(0);
170 170
171 if existing_prefix_len > 0 {171 if existing_prefix_len > 0 {
@@ -175,14 +175,14 @@ impl Match { · 3 unmodified lines
175 ));175 ));
176 }176 }
177 highlights.push((177 highlights.push((
178 offset + existing_prefix_len..offset + suffix.as_bytes().len(),178 offset + existing_prefix_len..offset + suffix.len(),
179 HighlightStyle::color(if self.entry(project, cx).is_some() {179 HighlightStyle::color(if self.entry(project, cx).is_some() {
180 Color::Conflict.color(cx)180 Color::Conflict.color(cx)
181 } else {181 } else {
182 Color::Created.color(cx)182 Color::Created.color(cx)
183 }),183 }),
184 ));184 ));
185 offset += suffix.as_bytes().len();185 offset += suffix.len();
186 if suffix.ends_with('/') {186 if suffix.ends_with('/') {
187 text.push_str(dir_indicator);187 text.push_str(dir_indicator);
188 highlights.push((188 highlights.push((
crates/fs/src/fs.rs+1−1
@@ -1261,7 +1261,7 @@ impl FakeFs { · 1260 unmodified lines
1261 self.with_git_state(dot_git, true, |state| {1261 self.with_git_state(dot_git, true, |state| {
1262 let branch = branch.map(Into::into);1262 let branch = branch.map(Into::into);
1263 state.branches.extend(branch.clone());1263 state.branches.extend(branch.clone());
1264 state.current_branch_name = branch.map(Into::into)1264 state.current_branch_name = branch
1265 })1265 })
1266 }1266 }
1267 1267
crates/fuzzy/src/paths.rs+1−1
@@ -140,7 +140,7 @@ pub async fn match_path_sets<'a, Set: PathMatchCandidateSet<'a>>( · 139 unmodified lines
140 let query_char_bag = CharBag::from(&lowercase_query[..]);140 let query_char_bag = CharBag::from(&lowercase_query[..]);
141 141
142 let num_cpus = executor.num_cpus().min(path_count);142 let num_cpus = executor.num_cpus().min(path_count);
143 let segment_size = (path_count + num_cpus - 1) / num_cpus;143 let segment_size = path_count.div_ceil(num_cpus);
144 let mut segment_results = (0..num_cpus)144 let mut segment_results = (0..num_cpus)
145 .map(|_| Vec::with_capacity(max_results))145 .map(|_| Vec::with_capacity(max_results))
146 .collect::<Vec<_>>();146 .collect::<Vec<_>>();
crates/fuzzy/src/strings.rs+1−1
@@ -145,7 +145,7 @@ pub async fn match_strings( · 144 unmodified lines
145 let query_char_bag = CharBag::from(&lowercase_query[..]);145 let query_char_bag = CharBag::from(&lowercase_query[..]);
146 146
147 let num_cpus = executor.num_cpus().min(candidates.len());147 let num_cpus = executor.num_cpus().min(candidates.len());
148 let segment_size = (candidates.len() + num_cpus - 1) / num_cpus;148 let segment_size = candidates.len().div_ceil(num_cpus);
149 let mut segment_results = (0..num_cpus)149 let mut segment_results = (0..num_cpus)
150 .map(|_| Vec::with_capacity(max_results.min(candidates.len())))150 .map(|_| Vec::with_capacity(max_results.min(candidates.len())))
151 .collect::<Vec<_>>();151 .collect::<Vec<_>>();
crates/git/src/blame.rs+1−1
@@ -344,7 +344,7 @@ mod tests { · 343 unmodified lines
344 have_json.push('\n');344 have_json.push('\n');
345 345
346 let update = std::env::var("UPDATE_GOLDEN")346 let update = std::env::var("UPDATE_GOLDEN")
347 .map(|val| val.to_ascii_lowercase() == "true")347 .map(|val| val.eq_ignore_ascii_case("true"))
348 .unwrap_or(false);348 .unwrap_or(false);
349 349
350 if update {350 if update {
crates/git/src/repository.rs+1−1
@@ -1019,7 +1019,7 @@ impl Borrow<Path> for RepoPath { · 1018 unmodified lines
1019#[derive(Debug)]1019#[derive(Debug)]
1020pub struct RepoPathDescendants<'a>(pub &'a Path);1020pub struct RepoPathDescendants<'a>(pub &'a Path);
1021 1021
1022impl<'a> MapSeekTarget<RepoPath> for RepoPathDescendants<'a> {1022impl MapSeekTarget<RepoPath> for RepoPathDescendants<'_> {
1023 fn cmp_cursor(&self, key: &RepoPath) -> Ordering {1023 fn cmp_cursor(&self, key: &RepoPath) -> Ordering {
1024 if key.starts_with(self.0) {1024 if key.starts_with(self.0) {
1025 Ordering::Greater1025 Ordering::Greater
crates/git_ui/src/git_panel.rs+1−1
@@ -553,7 +553,7 @@ impl GitPanel { · 552 unmodified lines
553 }553 }
554 554
555 fn select_first(&mut self, _: &SelectFirst, _window: &mut Window, cx: &mut Context<Self>) {555 fn select_first(&mut self, _: &SelectFirst, _window: &mut Window, cx: &mut Context<Self>) {
556 if self.entries.first().is_some() {556 if !self.entries.is_empty() {
557 self.selected_entry = Some(1);557 self.selected_entry = Some(1);
558 self.scroll_to_selected_entry(cx);558 self.scroll_to_selected_entry(cx);
559 }559 }
crates/gpui/src/app.rs+2−2
@@ -82,7 +82,7 @@ impl AppCell { · 81 unmodified lines
82#[derive(Deref, DerefMut)]82#[derive(Deref, DerefMut)]
83pub struct AppRef<'a>(Ref<'a, App>);83pub struct AppRef<'a>(Ref<'a, App>);
84 84
85impl<'a> Drop for AppRef<'a> {85impl Drop for AppRef<'_> {
86 fn drop(&mut self) {86 fn drop(&mut self) {
87 if option_env!("TRACK_THREAD_BORROWS").is_some() {87 if option_env!("TRACK_THREAD_BORROWS").is_some() {
88 let thread_id = std::thread::current().id();88 let thread_id = std::thread::current().id();
@@ -95,7 +95,7 @@ impl<'a> Drop for AppRef<'a> { · 6 unmodified lines
95#[derive(Deref, DerefMut)]95#[derive(Deref, DerefMut)]
96pub struct AppRefMut<'a>(RefMut<'a, App>);96pub struct AppRefMut<'a>(RefMut<'a, App>);
97 97
98impl<'a> Drop for AppRefMut<'a> {98impl Drop for AppRefMut<'_> {
99 fn drop(&mut self) {99 fn drop(&mut self) {
100 if option_env!("TRACK_THREAD_BORROWS").is_some() {100 if option_env!("TRACK_THREAD_BORROWS").is_some() {
101 let thread_id = std::thread::current().id();101 let thread_id = std::thread::current().id();
crates/gpui/src/app/context.rs+2−2
@@ -649,7 +649,7 @@ impl<'a, T: 'static> Context<'a, T> { · 648 unmodified lines
649 }649 }
650}650}
651 651
652impl<'a, T> Context<'a, T> {652impl<T> Context<'_, T> {
653 /// Emit an event of the specified type, which can be handled by other entities that have subscribed via `subscribe` methods on their respective contexts.653 /// Emit an event of the specified type, which can be handled by other entities that have subscribed via `subscribe` methods on their respective contexts.
654 pub fn emit<Evt>(&mut self, event: Evt)654 pub fn emit<Evt>(&mut self, event: Evt)
655 where655 where
@@ -664,7 +664,7 @@ impl<'a, T> Context<'a, T> { · 8 unmodified lines
664 }664 }
665}665}
666 666
667impl<'a, T> AppContext for Context<'a, T> {667impl<T> AppContext for Context<'_, T> {
668 type Result<U> = U;668 type Result<U> = U;
669 669
670 fn new<U: 'static>(670 fn new<U: 'static>(
crates/gpui/src/app/entity_map.rs+3−3
@@ -191,7 +191,7 @@ pub(crate) struct Lease<'a, T> { · 190 unmodified lines
191 entity_type: PhantomData<T>,191 entity_type: PhantomData<T>,
192}192}
193 193
194impl<'a, T: 'static> core::ops::Deref for Lease<'a, T> {194impl<T: 'static> core::ops::Deref for Lease<'_, T> {
195 type Target = T;195 type Target = T;
196 196
197 fn deref(&self) -> &Self::Target {197 fn deref(&self) -> &Self::Target {
@@ -199,13 +199,13 @@ impl<'a, T: 'static> core::ops::Deref for Lease<'a, T> { · 1 unmodified line
199 }199 }
200}200}
201 201
202impl<'a, T: 'static> core::ops::DerefMut for Lease<'a, T> {202impl<T: 'static> core::ops::DerefMut for Lease<'_, T> {
203 fn deref_mut(&mut self) -> &mut Self::Target {203 fn deref_mut(&mut self) -> &mut Self::Target {
204 self.entity.as_mut().unwrap().downcast_mut().unwrap()204 self.entity.as_mut().unwrap().downcast_mut().unwrap()
205 }205 }
206}206}
207 207
208impl<'a, T> Drop for Lease<'a, T> {208impl<T> Drop for Lease<'_, T> {
209 fn drop(&mut self) {209 fn drop(&mut self) {
210 if self.entity.is_some() && !panicking() {210 if self.entity.is_some() && !panicking() {
211 panic!("Leases must be ended with EntityMap::end_lease")211 panic!("Leases must be ended with EntityMap::end_lease")
crates/gpui/src/color.rs+2−2
@@ -82,7 +82,7 @@ impl From<Rgba> for u32 { · 81 unmodified lines
82 82
83struct RgbaVisitor;83struct RgbaVisitor;
84 84
85impl<'de> Visitor<'de> for RgbaVisitor {85impl Visitor<'_> for RgbaVisitor {
86 type Value = Rgba;86 type Value = Rgba;
87 87
88 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {88 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -180,7 +180,7 @@ impl TryFrom<&'_ str> for Rgba { · 91 unmodified lines
180 /// Duplicates a given hex digit.180 /// Duplicates a given hex digit.
181 /// E.g., `0xf` -> `0xff`.181 /// E.g., `0xf` -> `0xff`.
182 const fn duplicate(value: u8) -> u8 {182 const fn duplicate(value: u8) -> u8 {
183 value << 4 | value183 (value << 4) | value
184 }184 }
185 185
186 (duplicate(r), duplicate(g), duplicate(b), duplicate(a))186 (duplicate(r), duplicate(g), duplicate(b), duplicate(a))
crates/gpui/src/elements/list.rs+2−2
@@ -946,13 +946,13 @@ impl<'a> sum_tree::Dimension<'a, ListItemSummary> for Height { · 945 unmodified lines
946 }946 }
947}947}
948 948
949impl<'a> sum_tree::SeekTarget<'a, ListItemSummary, ListItemSummary> for Count {949impl sum_tree::SeekTarget<'_, ListItemSummary, ListItemSummary> for Count {
950 fn cmp(&self, other: &ListItemSummary, _: &()) -> std::cmp::Ordering {950 fn cmp(&self, other: &ListItemSummary, _: &()) -> std::cmp::Ordering {
951 self.0.partial_cmp(&other.count).unwrap()951 self.0.partial_cmp(&other.count).unwrap()
952 }952 }
953}953}
954 954
955impl<'a> sum_tree::SeekTarget<'a, ListItemSummary, ListItemSummary> for Height {955impl sum_tree::SeekTarget<'_, ListItemSummary, ListItemSummary> for Height {
956 fn cmp(&self, other: &ListItemSummary, _: &()) -> std::cmp::Ordering {956 fn cmp(&self, other: &ListItemSummary, _: &()) -> std::cmp::Ordering {
957 self.0.partial_cmp(&other.height).unwrap()957 self.0.partial_cmp(&other.height).unwrap()
958 }958 }
crates/gpui/src/executor.rs+1−1
@@ -587,7 +587,7 @@ impl<'a> Scope<'a> { · 586 unmodified lines
587 }587 }
588}588}
589 589
590impl<'a> Drop for Scope<'a> {590impl Drop for Scope<'_> {
591 fn drop(&mut self) {591 fn drop(&mut self) {
592 self.tx.take().unwrap();592 self.tx.take().unwrap();
593 593
crates/gpui/src/platform/mac/attributed_string.rs+0−1
@@ -5,7 +5,6 @@ use objc::{class, msg_send, sel, sel_impl}; · 4 unmodified lines
5/// The `cocoa` crate does not define NSAttributedString (and related Cocoa classes),5/// The `cocoa` crate does not define NSAttributedString (and related Cocoa classes),
6/// which are needed for copying rich text (that is, text intermingled with images)6/// which are needed for copying rich text (that is, text intermingled with images)
7/// to the clipboard. This adds access to those APIs.7/// to the clipboard. This adds access to those APIs.
8
9#[allow(non_snake_case)]8#[allow(non_snake_case)]
10pub trait NSAttributedString: Sized {9pub trait NSAttributedString: Sized {
11 unsafe fn alloc(_: Self) -> id {10 unsafe fn alloc(_: Self) -> id {
crates/gpui/src/platform/mac/dispatcher.rs+1−1
@@ -26,7 +26,7 @@ pub(crate) mod dispatch_sys { · 25 unmodified lines
26 26
27use dispatch_sys::*;27use dispatch_sys::*;
28pub(crate) fn dispatch_get_main_queue() -> dispatch_queue_t {28pub(crate) fn dispatch_get_main_queue() -> dispatch_queue_t {
29 unsafe { addr_of!(_dispatch_main_q) as *const _ as dispatch_queue_t }29 addr_of!(_dispatch_main_q) as *const _ as dispatch_queue_t
30}30}
31 31
32pub(crate) struct MacDispatcher {32pub(crate) struct MacDispatcher {
crates/gpui/src/platform/windows/window.rs+3−3
@@ -1221,10 +1221,10 @@ fn set_window_composition_attribute(hwnd: HWND, color: Option<Color>, state: u32 · 1220 unmodified lines
1221 unsafe {1221 unsafe {
1222 type SetWindowCompositionAttributeType =1222 type SetWindowCompositionAttributeType =
1223 unsafe extern "system" fn(HWND, *mut WINDOWCOMPOSITIONATTRIBDATA) -> BOOL;1223 unsafe extern "system" fn(HWND, *mut WINDOWCOMPOSITIONATTRIBDATA) -> BOOL;
1224 let module_name = PCSTR::from_raw("user32.dll\0".as_ptr());1224 let module_name = PCSTR::from_raw(c"user32.dll".as_ptr() as *const u8);
1225 let user32 = GetModuleHandleA(module_name);1225 let user32 = GetModuleHandleA(module_name);
1226 if user32.is_ok() {1226 if user32.is_ok() {
1227 let func_name = PCSTR::from_raw("SetWindowCompositionAttribute\0".as_ptr());1227 let func_name = PCSTR::from_raw(c"SetWindowCompositionAttribute".as_ptr() as *const u8);
1228 let set_window_composition_attribute: SetWindowCompositionAttributeType =1228 let set_window_composition_attribute: SetWindowCompositionAttributeType =
1229 std::mem::transmute(GetProcAddress(user32.unwrap(), func_name));1229 std::mem::transmute(GetProcAddress(user32.unwrap(), func_name));
1230 let mut color = color.unwrap_or_default();1230 let mut color = color.unwrap_or_default();
@@ -1238,7 +1238,7 @@ fn set_window_composition_attribute(hwnd: HWND, color: Option<Color>, state: u32 · 7 unmodified lines
1238 gradient_color: (color.0 as u32)1238 gradient_color: (color.0 as u32)
1239 | ((color.1 as u32) << 8)1239 | ((color.1 as u32) << 8)
1240 | ((color.2 as u32) << 16)1240 | ((color.2 as u32) << 16)
1241 | (color.3 as u32) << 24,1241 | ((color.3 as u32) << 24),
1242 animation_id: 0,1242 animation_id: 0,
1243 };1243 };
1244 let mut data = WINDOWCOMPOSITIONATTRIBDATA {1244 let mut data = WINDOWCOMPOSITIONATTRIBDATA {
crates/gpui/src/text_system.rs+9−0
@@ -670,6 +670,15 @@ pub struct TextRun { · 669 unmodified lines
670 pub strikethrough: Option<StrikethroughStyle>,670 pub strikethrough: Option<StrikethroughStyle>,
671}671}
672 672
673#[cfg(all(target_os = "macos", test))]
674impl TextRun {
675 fn with_len(&self, len: usize) -> Self {
676 let mut this = self.clone();
677 this.len = len;
678 this
679 }
680}
681
673/// An identifier for a specific glyph, as returned by [`TextSystem::layout_line`].682/// An identifier for a specific glyph, as returned by [`TextSystem::layout_line`].
674#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]683#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
675#[repr(C)]684#[repr(C)]
crates/gpui/src/text_system/line_layout.rs+4−4
@@ -601,15 +601,15 @@ struct CacheKeyRef<'a> { · 600 unmodified lines
601 wrap_width: Option<Pixels>,601 wrap_width: Option<Pixels>,
602}602}
603 603
604impl<'a> PartialEq for (dyn AsCacheKeyRef + 'a) {604impl PartialEq for (dyn AsCacheKeyRef + '_) {
605 fn eq(&self, other: &dyn AsCacheKeyRef) -> bool {605 fn eq(&self, other: &dyn AsCacheKeyRef) -> bool {
606 self.as_cache_key_ref() == other.as_cache_key_ref()606 self.as_cache_key_ref() == other.as_cache_key_ref()
607 }607 }
608}608}
609 609
610impl<'a> Eq for (dyn AsCacheKeyRef + 'a) {}610impl Eq for (dyn AsCacheKeyRef + '_) {}
611 611
612impl<'a> Hash for (dyn AsCacheKeyRef + 'a) {612impl Hash for (dyn AsCacheKeyRef + '_) {
613 fn hash<H: Hasher>(&self, state: &mut H) {613 fn hash<H: Hasher>(&self, state: &mut H) {
614 self.as_cache_key_ref().hash(state)614 self.as_cache_key_ref().hash(state)
615 }615 }
@@ -644,7 +644,7 @@ impl<'a> Borrow<dyn AsCacheKeyRef + 'a> for Arc<CacheKey> { · 28 unmodified lines
644 }644 }
645}645}
646 646
647impl<'a> AsCacheKeyRef for CacheKeyRef<'a> {647impl AsCacheKeyRef for CacheKeyRef<'_> {
648 fn as_cache_key_ref(&self) -> CacheKeyRef {648 fn as_cache_key_ref(&self) -> CacheKeyRef {
649 *self649 *self
650 }650 }
crates/gpui/src/text_system/line_wrapper.rs+0−8
@@ -543,14 +543,6 @@ mod tests { · 542 unmodified lines
543 background_color: None,543 background_color: None,
544 };544 };
545 545
546 impl TextRun {
547 fn with_len(&self, len: usize) -> Self {
548 let mut this = self.clone();
549 this.len = len;
550 this
551 }
552 }
553
554 let text = "aa bbb cccc ddddd eeee".into();546 let text = "aa bbb cccc ddddd eeee".into();
555 let lines = text_system547 let lines = text_system
556 .shape_text(548 .shape_text(
crates/gpui/src/util.rs+1−1
@@ -72,7 +72,7 @@ where · 71 unmodified lines
72pub struct CwdBacktrace<'a>(pub &'a backtrace::Backtrace);72pub struct CwdBacktrace<'a>(pub &'a backtrace::Backtrace);
73 73
74#[cfg(any(test, feature = "test-support"))]74#[cfg(any(test, feature = "test-support"))]
75impl<'a> std::fmt::Debug for CwdBacktrace<'a> {75impl std::fmt::Debug for CwdBacktrace<'_> {
76 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {76 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
77 use backtrace::{BacktraceFmt, BytesOrWideString};77 use backtrace::{BacktraceFmt, BytesOrWideString};
78 78
crates/gpui/src/window.rs+0−2
@@ -3689,8 +3689,6 @@ impl Window { · 3688 unmodified lines
3689 dispatch_tree.bindings_for_action(action, &[context])3689 dispatch_tree.bindings_for_action(action, &[context])
3690 }3690 }
3691 3691
3692 /// Returns a generic event listener that invokes the given listener with the view and context associated with the given view handle.
3693
3694 /// Returns a generic event listener that invokes the given listener with the view and context associated with the given view handle.3692 /// Returns a generic event listener that invokes the given listener with the view and context associated with the given view handle.
3695 pub fn listener_for<V: Render, E>(3693 pub fn listener_for<V: Render, E>(
3696 &self,3694 &self,
crates/http_client/src/http_client.rs+2−2
@@ -79,7 +79,7 @@ pub trait HttpClient: 'static + Send + Sync { · 78 unmodified lines
79 .body(body);79 .body(body);
80 80
81 match request {81 match request {
82 Ok(request) => Box::pin(async move { self.send(request).await.map_err(Into::into) }),82 Ok(request) => Box::pin(async move { self.send(request).await }),
83 Err(e) => Box::pin(async move { Err(e.into()) }),83 Err(e) => Box::pin(async move { Err(e.into()) }),
84 }84 }
85 }85 }
@@ -96,7 +96,7 @@ pub trait HttpClient: 'static + Send + Sync { · 10 unmodified lines
96 .body(body);96 .body(body);
97 97
98 match request {98 match request {
99 Ok(request) => Box::pin(async move { self.send(request).await.map_err(Into::into) }),99 Ok(request) => Box::pin(async move { self.send(request).await }),
100 Err(e) => Box::pin(async move { Err(e.into()) }),100 Err(e) => Box::pin(async move { Err(e.into()) }),
101 }101 }
102 }102 }
crates/language/src/buffer.rs+3−3
@@ -509,7 +509,7 @@ impl fmt::Debug for ChunkRenderer { · 508 unmodified lines
509 }509 }
510}510}
511 511
512impl<'a, 'b> Deref for ChunkRendererContext<'a, 'b> {512impl Deref for ChunkRendererContext<'_, '_> {
513 type Target = App;513 type Target = App;
514 514
515 fn deref(&self) -> &Self::Target {515 fn deref(&self) -> &Self::Target {
@@ -517,7 +517,7 @@ impl<'a, 'b> Deref for ChunkRendererContext<'a, 'b> { · 1 unmodified line
517 }517 }
518}518}
519 519
520impl<'a, 'b> DerefMut for ChunkRendererContext<'a, 'b> {520impl DerefMut for ChunkRendererContext<'_, '_> {
521 fn deref_mut(&mut self) -> &mut Self::Target {521 fn deref_mut(&mut self) -> &mut Self::Target {
522 self.context522 self.context
523 }523 }
@@ -4137,7 +4137,7 @@ impl Deref for BufferSnapshot { · 3613 unmodified lines
4137 }4137 }
4138}4138}
4139 4139
4140unsafe impl<'a> Send for BufferChunks<'a> {}4140unsafe impl Send for BufferChunks<'_> {}
4141 4141
4142impl<'a> BufferChunks<'a> {4142impl<'a> BufferChunks<'a> {
4143 pub(crate) fn new(4143 pub(crate) fn new(
crates/language/src/syntax_map.rs+9−11
@@ -836,7 +836,7 @@ impl SyntaxSnapshot { · 835 unmodified lines
836 }836 }
837 837
838 #[cfg(test)]838 #[cfg(test)]
839 pub fn layers<'a>(&'a self, buffer: &'a BufferSnapshot) -> Vec<SyntaxLayer> {839 pub fn layers<'a>(&'a self, buffer: &'a BufferSnapshot) -> Vec<SyntaxLayer<'a>> {
840 self.layers_for_range(0..buffer.len(), buffer, true)840 self.layers_for_range(0..buffer.len(), buffer, true)
841 .collect()841 .collect()
842 }842 }
@@ -1142,7 +1142,7 @@ impl<'a> SyntaxMapMatches<'a> { · 299 unmodified lines
1142 }1142 }
1143}1143}
1144 1144
1145impl<'a> SyntaxMapCapturesLayer<'a> {1145impl SyntaxMapCapturesLayer<'_> {
1146 fn advance(&mut self) {1146 fn advance(&mut self) {
1147 self.next_capture = self.captures.next().map(|(mat, ix)| mat.captures[*ix]);1147 self.next_capture = self.captures.next().map(|(mat, ix)| mat.captures[*ix]);
1148 }1148 }
@@ -1157,7 +1157,7 @@ impl<'a> SyntaxMapCapturesLayer<'a> { · 8 unmodified lines
1157 }1157 }
1158}1158}
1159 1159
1160impl<'a> SyntaxMapMatchesLayer<'a> {1160impl SyntaxMapMatchesLayer<'_> {
1161 fn advance(&mut self) {1161 fn advance(&mut self) {
1162 if let Some(mat) = self.matches.next() {1162 if let Some(mat) = self.matches.next() {
1163 self.next_captures.clear();1163 self.next_captures.clear();
@@ -1740,7 +1740,7 @@ impl sum_tree::Summary for SyntaxLayerSummary { · 576 unmodified lines
1740 }1740 }
1741}1741}
1742 1742
1743impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary> for SyntaxLayerPosition {1743impl SeekTarget<'_, SyntaxLayerSummary, SyntaxLayerSummary> for SyntaxLayerPosition {
1744 fn cmp(&self, cursor_location: &SyntaxLayerSummary, buffer: &BufferSnapshot) -> Ordering {1744 fn cmp(&self, cursor_location: &SyntaxLayerSummary, buffer: &BufferSnapshot) -> Ordering {
1745 Ord::cmp(&self.depth, &cursor_location.max_depth)1745 Ord::cmp(&self.depth, &cursor_location.max_depth)
1746 .then_with(|| {1746 .then_with(|| {
@@ -1758,16 +1758,14 @@ impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary> for SyntaxLayerP · 11 unmodified lines
1758 }1758 }
1759}1759}
1760 1760
1761impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary> for ChangeStartPosition {1761impl SeekTarget<'_, SyntaxLayerSummary, SyntaxLayerSummary> for ChangeStartPosition {
1762 fn cmp(&self, cursor_location: &SyntaxLayerSummary, text: &BufferSnapshot) -> Ordering {1762 fn cmp(&self, cursor_location: &SyntaxLayerSummary, text: &BufferSnapshot) -> Ordering {
1763 Ord::cmp(&self.depth, &cursor_location.max_depth)1763 Ord::cmp(&self.depth, &cursor_location.max_depth)
1764 .then_with(|| self.position.cmp(&cursor_location.range.end, text))1764 .then_with(|| self.position.cmp(&cursor_location.range.end, text))
1765 }1765 }
1766}1766}
1767 1767
1768impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary>1768impl SeekTarget<'_, SyntaxLayerSummary, SyntaxLayerSummary> for SyntaxLayerPositionBeforeChange {
1769 for SyntaxLayerPositionBeforeChange
1770{
1771 fn cmp(&self, cursor_location: &SyntaxLayerSummary, buffer: &BufferSnapshot) -> Ordering {1769 fn cmp(&self, cursor_location: &SyntaxLayerSummary, buffer: &BufferSnapshot) -> Ordering {
1772 if self.change.cmp(cursor_location, buffer).is_le() {1770 if self.change.cmp(cursor_location, buffer).is_le() {
1773 Ordering::Less1771 Ordering::Less
@@ -1869,7 +1867,7 @@ struct LogPoint(Point); · 95 unmodified lines
1869struct LogAnchorRange<'a>(&'a Range<Anchor>, &'a text::BufferSnapshot);1867struct LogAnchorRange<'a>(&'a Range<Anchor>, &'a text::BufferSnapshot);
1870struct LogChangedRegions<'a>(&'a ChangeRegionSet, &'a text::BufferSnapshot);1868struct LogChangedRegions<'a>(&'a ChangeRegionSet, &'a text::BufferSnapshot);
1871 1869
1872impl<'a> fmt::Debug for LogIncludedRanges<'a> {1870impl fmt::Debug for LogIncludedRanges<'_> {
1873 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {1871 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1874 f.debug_list()1872 f.debug_list()
1875 .entries(self.0.iter().map(|range| {1873 .entries(self.0.iter().map(|range| {
@@ -1881,14 +1879,14 @@ impl<'a> fmt::Debug for LogIncludedRanges<'a> { · 5 unmodified lines
1881 }1879 }
1882}1880}
1883 1881
1884impl<'a> fmt::Debug for LogAnchorRange<'a> {1882impl fmt::Debug for LogAnchorRange<'_> {
1885 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {1883 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1886 let range = self.0.to_point(self.1);1884 let range = self.0.to_point(self.1);
1887 (LogPoint(range.start)..LogPoint(range.end)).fmt(f)1885 (LogPoint(range.start)..LogPoint(range.end)).fmt(f)
1888 }1886 }
1889}1887}
1890 1888
1891impl<'a> fmt::Debug for LogChangedRegions<'a> {1889impl fmt::Debug for LogChangedRegions<'_> {
1892 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {1890 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1893 f.debug_list()1891 f.debug_list()
1894 .entries(1892 .entries(
crates/language_extension/src/extension_lsp_adapter.rs+1−7
@@ -305,13 +305,7 @@ impl LspAdapter for ExtensionLspAdapter { · 304 unmodified lines
305 .labels_for_symbols(self.language_server_id.clone(), symbols)305 .labels_for_symbols(self.language_server_id.clone(), symbols)
306 .await?;306 .await?;
307 307
308 Ok(labels_from_extension(308 Ok(labels_from_extension(labels, language))
309 labels
310 .into_iter()
311 .map(|label| label.map(Into::into))
312 .collect(),
313 language,
314 ))
315 }309 }
316}310}
317 311
crates/language_model/src/model/cloud_model.rs+2−2
@@ -153,8 +153,8 @@ impl LlmApiToken { · 152 unmodified lines
153 Self::fetch(self.0.write().await, client).await153 Self::fetch(self.0.write().await, client).await
154 }154 }
155 155
156 async fn fetch<'a>(156 async fn fetch(
157 mut lock: RwLockWriteGuard<'a, Option<String>>,157 mut lock: RwLockWriteGuard<'_, Option<String>>,
158 client: &Arc<Client>,158 client: &Arc<Client>,
159 ) -> Result<String> {159 ) -> Result<String> {
160 let response = client.request(proto::GetLlmToken {}).await?;160 let response = client.request(proto::GetLlmToken {}).await?;
crates/languages/src/python.rs+1−1
@@ -684,7 +684,7 @@ impl<'a> EnvironmentApi<'a> { · 683 unmodified lines
684 }684 }
685}685}
686 686
687impl<'a> pet_core::os_environment::Environment for EnvironmentApi<'a> {687impl pet_core::os_environment::Environment for EnvironmentApi<'_> {
688 fn get_user_home(&self) -> Option<PathBuf> {688 fn get_user_home(&self) -> Option<PathBuf> {
689 self.user_home()689 self.user_home()
690 }690 }
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]);
crates/notifications/src/notification_store.rs+2−2
@@ -469,7 +469,7 @@ impl sum_tree::Summary for NotificationSummary { · 468 unmodified lines
469 }469 }
470}470}
471 471
472impl<'a> sum_tree::Dimension<'a, NotificationSummary> for NotificationId {472impl sum_tree::Dimension<'_, NotificationSummary> for NotificationId {
473 fn zero(_cx: &()) -> Self {473 fn zero(_cx: &()) -> Self {
474 Default::default()474 Default::default()
475 }475 }
@@ -480,7 +480,7 @@ impl<'a> sum_tree::Dimension<'a, NotificationSummary> for NotificationId { · 4 unmodified lines
480 }480 }
481}481}
482 482
483impl<'a> sum_tree::Dimension<'a, NotificationSummary> for Count {483impl sum_tree::Dimension<'_, NotificationSummary> for Count {
484 fn zero(_cx: &()) -> Self {484 fn zero(_cx: &()) -> Self {
485 Default::default()485 Default::default()
486 }486 }
crates/project/src/buffer_store.rs+2−2
@@ -1632,9 +1632,9 @@ impl BufferStore { · 1631 unmodified lines
1632 // file in the Cargo registry (presumably opened with go-to-definition1632 // file in the Cargo registry (presumably opened with go-to-definition
1633 // from a normal Rust file). If so, we can put together a permalink1633 // from a normal Rust file). If so, we can put together a permalink
1634 // using crate metadata.1634 // using crate metadata.
1635 if !buffer1635 if buffer
1636 .language()1636 .language()
1637 .is_some_and(|lang| lang.name() == "Rust".into())1637 .is_none_or(|lang| lang.name() != "Rust".into())
1638 {1638 {
1639 return Task::ready(Err(anyhow!("no permalink available")));1639 return Task::ready(Err(anyhow!("no permalink available")));
1640 }1640 }
crates/rope/src/chunk.rs+1−1
@@ -78,7 +78,7 @@ pub struct ChunkSlice<'a> { · 77 unmodified lines
78 text: &'a str,78 text: &'a str,
79}79}
80 80
81impl<'a> Into<Chunk> for ChunkSlice<'a> {81impl Into<Chunk> for ChunkSlice<'_> {
82 fn into(self) -> Chunk {82 fn into(self) -> Chunk {
83 Chunk {83 Chunk {
84 chars: self.chars,84 chars: self.chars,
crates/rope/src/point.rs+2−2
@@ -124,8 +124,8 @@ impl PartialOrd for Point { · 123 unmodified lines
124impl Ord for Point {124impl Ord for Point {
125 #[cfg(target_pointer_width = "64")]125 #[cfg(target_pointer_width = "64")]
126 fn cmp(&self, other: &Point) -> Ordering {126 fn cmp(&self, other: &Point) -> Ordering {
127 let a = (self.row as usize) << 32 | self.column as usize;127 let a = ((self.row as usize) << 32) | self.column as usize;
128 let b = (other.row as usize) << 32 | other.column as usize;128 let b = ((other.row as usize) << 32) | other.column as usize;
129 a.cmp(&b)129 a.cmp(&b)
130 }130 }
131 131
crates/rope/src/point_utf16.rs+2−2
@@ -104,8 +104,8 @@ impl PartialOrd for PointUtf16 { · 103 unmodified lines
104impl Ord for PointUtf16 {104impl Ord for PointUtf16 {
105 #[cfg(target_pointer_width = "64")]105 #[cfg(target_pointer_width = "64")]
106 fn cmp(&self, other: &PointUtf16) -> Ordering {106 fn cmp(&self, other: &PointUtf16) -> Ordering {
107 let a = (self.row as usize) << 32 | self.column as usize;107 let a = ((self.row as usize) << 32) | self.column as usize;
108 let b = (other.row as usize) << 32 | other.column as usize;108 let b = ((other.row as usize) << 32) | other.column as usize;
109 a.cmp(&b)109 a.cmp(&b)
110 }110 }
111 111
crates/rope/src/rope.rs+3−3
@@ -145,7 +145,7 @@ impl Rope { · 144 unmodified lines
145 145
146 // We also round up the capacity up by one, for a good measure; we *really* don't want to realloc here, as we assume that the # of characters146 // We also round up the capacity up by one, for a good measure; we *really* don't want to realloc here, as we assume that the # of characters
147 // we're working with there is large.147 // we're working with there is large.
148 let capacity = (text.len() + MIN_CHUNK_SIZE - 1) / MIN_CHUNK_SIZE;148 let capacity = text.len().div_ceil(MIN_CHUNK_SIZE);
149 let mut new_chunks = Vec::with_capacity(capacity);149 let mut new_chunks = Vec::with_capacity(capacity);
150 150
151 while !text.is_empty() {151 while !text.is_empty() {
@@ -855,7 +855,7 @@ impl<'a> Iterator for Bytes<'a> { · 703 unmodified lines
855 }855 }
856}856}
857 857
858impl<'a> io::Read for Bytes<'a> {858impl io::Read for Bytes<'_> {
859 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {859 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
860 if let Some(chunk) = self.peek() {860 if let Some(chunk) = self.peek() {
861 let len = cmp::min(buf.len(), chunk.len());861 let len = cmp::min(buf.len(), chunk.len());
@@ -889,7 +889,7 @@ pub struct Lines<'a> { · 27 unmodified lines
889 reversed: bool,889 reversed: bool,
890}890}
891 891
892impl<'a> Lines<'a> {892impl Lines<'_> {
893 pub fn next(&mut self) -> Option<&str> {893 pub fn next(&mut self) -> Option<&str> {
894 if self.done {894 if self.done {
895 return None;895 return None;
crates/search/src/buffer_search.rs+1−1
@@ -1909,7 +1909,7 @@ mod tests { · 1908 unmodified lines
1909 .unindent();1909 .unindent();
1910 let expected_query_matches_count = buffer_text1910 let expected_query_matches_count = buffer_text
1911 .chars()1911 .chars()
1912 .filter(|c| c.to_ascii_lowercase() == 'a')1912 .filter(|c| c.eq_ignore_ascii_case(&'a'))
1913 .count();1913 .count();
1914 assert!(1914 assert!(
1915 expected_query_matches_count > 1,1915 expected_query_matches_count > 1,
crates/settings/src/json_schema.rs+1−1
@@ -8,7 +8,7 @@ pub struct SettingsJsonSchemaParams<'a> { · 7 unmodified lines
8 pub font_names: &'a [String],8 pub font_names: &'a [String],
9}9}
10 10
11impl<'a> SettingsJsonSchemaParams<'a> {11impl SettingsJsonSchemaParams<'_> {
12 pub fn font_family_schema(&self) -> Schema {12 pub fn font_family_schema(&self) -> Schema {
13 let available_fonts: Vec<_> = self.font_names.iter().cloned().map(Value::String).collect();13 let available_fonts: Vec<_> = self.font_names.iter().cloned().map(Value::String).collect();
14 14
crates/sqlez/src/statement.rs+1−1
@@ -377,7 +377,7 @@ impl<'a> Statement<'a> { · 376 unmodified lines
377 }377 }
378}378}
379 379
380impl<'a> Drop for Statement<'a> {380impl Drop for Statement<'_> {
381 fn drop(&mut self) {381 fn drop(&mut self) {
382 unsafe {382 unsafe {
383 for raw_statement in self.raw_statements.iter() {383 for raw_statement in self.raw_statements.iter() {
crates/sum_tree/src/cursor.rs+4−4
@@ -9,7 +9,7 @@ struct StackEntry<'a, T: Item, D> { · 8 unmodified lines
9 position: D,9 position: D,
10}10}
11 11
12impl<'a, T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for StackEntry<'a, T, D> {12impl<T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for StackEntry<'_, T, D> {
13 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {13 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14 f.debug_struct("StackEntry")14 f.debug_struct("StackEntry")
15 .field("index", &self.index)15 .field("index", &self.index)
@@ -27,7 +27,7 @@ pub struct Cursor<'a, T: Item, D> { · 11 unmodified lines
27 at_end: bool,27 at_end: bool,
28}28}
29 29
30impl<'a, T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for Cursor<'a, T, D>30impl<T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for Cursor<'_, T, D>
31where31where
32 T::Summary: fmt::Debug,32 T::Summary: fmt::Debug,
33{33{
@@ -742,14 +742,14 @@ struct SliceSeekAggregate<T: Item> { · 708 unmodified lines
742 742
743struct SummarySeekAggregate<D>(D);743struct SummarySeekAggregate<D>(D);
744 744
745impl<'a, T: Item> SeekAggregate<'a, T> for () {745impl<T: Item> SeekAggregate<'_, T> for () {
746 fn begin_leaf(&mut self) {}746 fn begin_leaf(&mut self) {}
747 fn end_leaf(&mut self, _: &<T::Summary as Summary>::Context) {}747 fn end_leaf(&mut self, _: &<T::Summary as Summary>::Context) {}
748 fn push_item(&mut self, _: &T, _: &T::Summary, _: &<T::Summary as Summary>::Context) {}748 fn push_item(&mut self, _: &T, _: &T::Summary, _: &<T::Summary as Summary>::Context) {}
749 fn push_tree(&mut self, _: &SumTree<T>, _: &T::Summary, _: &<T::Summary as Summary>::Context) {}749 fn push_tree(&mut self, _: &SumTree<T>, _: &T::Summary, _: &<T::Summary as Summary>::Context) {}
750}750}
751 751
752impl<'a, T: Item> SeekAggregate<'a, T> for SliceSeekAggregate<T> {752impl<T: Item> SeekAggregate<'_, T> for SliceSeekAggregate<T> {
753 fn begin_leaf(&mut self) {}753 fn begin_leaf(&mut self) {}
754 fn end_leaf(&mut self, cx: &<T::Summary as Summary>::Context) {754 fn end_leaf(&mut self, cx: &<T::Summary as Summary>::Context) {
755 self.tree.append(755 self.tree.append(
crates/sum_tree/src/sum_tree.rs+4−4
@@ -1468,7 +1468,7 @@ mod tests { · 1467 unmodified lines
1468 }1468 }
1469 }1469 }
1470 1470
1471 impl<'a> Dimension<'a, IntegersSummary> for u8 {1471 impl Dimension<'_, IntegersSummary> for u8 {
1472 fn zero(_cx: &()) -> Self {1472 fn zero(_cx: &()) -> Self {
1473 Default::default()1473 Default::default()
1474 }1474 }
@@ -1478,7 +1478,7 @@ mod tests { · 3 unmodified lines
1478 }1478 }
1479 }1479 }
1480 1480
1481 impl<'a> Dimension<'a, IntegersSummary> for Count {1481 impl Dimension<'_, IntegersSummary> for Count {
1482 fn zero(_cx: &()) -> Self {1482 fn zero(_cx: &()) -> Self {
1483 Default::default()1483 Default::default()
1484 }1484 }
@@ -1488,13 +1488,13 @@ mod tests { · 3 unmodified lines
1488 }1488 }
1489 }1489 }
1490 1490
1491 impl<'a> SeekTarget<'a, IntegersSummary, IntegersSummary> for Count {1491 impl SeekTarget<'_, IntegersSummary, IntegersSummary> for Count {
1492 fn cmp(&self, cursor_location: &IntegersSummary, _: &()) -> Ordering {1492 fn cmp(&self, cursor_location: &IntegersSummary, _: &()) -> Ordering {
1493 self.0.cmp(&cursor_location.count)1493 self.0.cmp(&cursor_location.count)
1494 }1494 }
1495 }1495 }
1496 1496
1497 impl<'a> Dimension<'a, IntegersSummary> for Sum {1497 impl Dimension<'_, IntegersSummary> for Sum {
1498 fn zero(_cx: &()) -> Self {1498 fn zero(_cx: &()) -> Self {
1499 Default::default()1499 Default::default()
1500 }1500 }
crates/sum_tree/src/tree_map.rs+1−1
@@ -26,7 +26,7 @@ impl<K> Default for MapKey<K> { · 25 unmodified lines
26#[derive(Clone, Debug)]26#[derive(Clone, Debug)]
27pub struct MapKeyRef<'a, K>(Option<&'a K>);27pub struct MapKeyRef<'a, K>(Option<&'a K>);
28 28
29impl<'a, K> Default for MapKeyRef<'a, K> {29impl<K> Default for MapKeyRef<'_, K> {
30 fn default() -> Self {30 fn default() -> Self {
31 Self(None)31 Self(None)
32 }32 }
crates/terminal/src/pty_info.rs+1−4
@@ -123,10 +123,7 @@ impl PtyProcessInfo { · 122 unmodified lines
123 123
124 fn load(&mut self) -> Option<ProcessInfo> {124 fn load(&mut self) -> Option<ProcessInfo> {
125 let process = self.refresh()?;125 let process = self.refresh()?;
126 let cwd = process126 let cwd = process.cwd().map_or(PathBuf::new(), |p| p.to_owned());
127 .cwd()
128 .take()
129 .map_or(PathBuf::new(), |p| p.to_owned());
130 127
131 let info = ProcessInfo {128 let info = ProcessInfo {
132 name: process.name().to_str()?.to_owned(),129 name: process.name().to_str()?.to_owned(),
crates/text/src/operation_queue.rs+2−2
@@ -81,7 +81,7 @@ impl Summary for OperationSummary { · 80 unmodified lines
81 }81 }
82}82}
83 83
84impl<'a> Add<&'a Self> for OperationSummary {84impl Add<&Self> for OperationSummary {
85 type Output = Self;85 type Output = Self;
86 86
87 fn add(self, other: &Self) -> Self {87 fn add(self, other: &Self) -> Self {
@@ -93,7 +93,7 @@ impl<'a> Add<&'a Self> for OperationSummary { · 5 unmodified lines
93 }93 }
94}94}
95 95
96impl<'a> Dimension<'a, OperationSummary> for OperationKey {96impl Dimension<'_, OperationSummary> for OperationKey {
97 fn zero(_cx: &()) -> Self {97 fn zero(_cx: &()) -> Self {
98 Default::default()98 Default::default()
99 }99 }
crates/text/src/text.rs+6−6
@@ -2533,7 +2533,7 @@ impl<'a> RopeBuilder<'a> { · 2532 unmodified lines
2533 }2533 }
2534}2534}
2535 2535
2536impl<'a, D: TextDimension + Ord, F: FnMut(&FragmentSummary) -> bool> Iterator for Edits<'a, D, F> {2536impl<D: TextDimension + Ord, F: FnMut(&FragmentSummary) -> bool> Iterator for Edits<'_, D, F> {
2537 type Item = (Edit<D>, Range<Anchor>);2537 type Item = (Edit<D>, Range<Anchor>);
2538 2538
2539 fn next(&mut self) -> Option<Self::Item> {2539 fn next(&mut self) -> Option<Self::Item> {
@@ -2801,7 +2801,7 @@ impl ops::Sub for FullOffset { · 261 unmodified lines
2801 }2801 }
2802}2802}
2803 2803
2804impl<'a> sum_tree::Dimension<'a, FragmentSummary> for usize {2804impl sum_tree::Dimension<'_, FragmentSummary> for usize {
2805 fn zero(_: &Option<clock::Global>) -> Self {2805 fn zero(_: &Option<clock::Global>) -> Self {
2806 Default::default()2806 Default::default()
2807 }2807 }
@@ -2811,7 +2811,7 @@ impl<'a> sum_tree::Dimension<'a, FragmentSummary> for usize { · 3 unmodified lines
2811 }2811 }
2812}2812}
2813 2813
2814impl<'a> sum_tree::Dimension<'a, FragmentSummary> for FullOffset {2814impl sum_tree::Dimension<'_, FragmentSummary> for FullOffset {
2815 fn zero(_: &Option<clock::Global>) -> Self {2815 fn zero(_: &Option<clock::Global>) -> Self {
2816 Default::default()2816 Default::default()
2817 }2817 }
@@ -2831,7 +2831,7 @@ impl<'a> sum_tree::Dimension<'a, FragmentSummary> for Option<&'a Locator> { · 13 unmodified lines
2831 }2831 }
2832}2832}
2833 2833
2834impl<'a> sum_tree::SeekTarget<'a, FragmentSummary, FragmentTextSummary> for usize {2834impl sum_tree::SeekTarget<'_, FragmentSummary, FragmentTextSummary> for usize {
2835 fn cmp(2835 fn cmp(
2836 &self,2836 &self,
2837 cursor_location: &FragmentTextSummary,2837 cursor_location: &FragmentTextSummary,
@@ -2880,7 +2880,7 @@ impl<'a> sum_tree::Dimension<'a, FragmentSummary> for VersionedFullOffset { · 42 unmodified lines
2880 }2880 }
2881}2881}
2882 2882
2883impl<'a> sum_tree::SeekTarget<'a, FragmentSummary, Self> for VersionedFullOffset {2883impl sum_tree::SeekTarget<'_, FragmentSummary, Self> for VersionedFullOffset {
2884 fn cmp(&self, cursor_position: &Self, _: &Option<clock::Global>) -> cmp::Ordering {2884 fn cmp(&self, cursor_position: &Self, _: &Option<clock::Global>) -> cmp::Ordering {
2885 match (self, cursor_position) {2885 match (self, cursor_position) {
2886 (Self::Offset(a), Self::Offset(b)) => Ord::cmp(a, b),2886 (Self::Offset(a), Self::Offset(b)) => Ord::cmp(a, b),
@@ -2952,7 +2952,7 @@ impl ToOffset for Anchor { · 65 unmodified lines
2952 }2952 }
2953}2953}
2954 2954
2955impl<'a, T: ToOffset> ToOffset for &'a T {2955impl<T: ToOffset> ToOffset for &T {
2956 fn to_offset(&self, content: &BufferSnapshot) -> usize {2956 fn to_offset(&self, content: &BufferSnapshot) -> usize {
2957 (*self).to_offset(content)2957 (*self).to_offset(content)
2958 }2958 }
crates/util/src/arc_cow.rs+8−8
@@ -11,7 +11,7 @@ pub enum ArcCow<'a, T: ?Sized> { · 10 unmodified lines
11 Owned(Arc<T>),11 Owned(Arc<T>),
12}12}
13 13
14impl<'a, T: ?Sized + PartialEq> PartialEq for ArcCow<'a, T> {14impl<T: ?Sized + PartialEq> PartialEq for ArcCow<'_, T> {
15 fn eq(&self, other: &Self) -> bool {15 fn eq(&self, other: &Self) -> bool {
16 let a = self.as_ref();16 let a = self.as_ref();
17 let b = other.as_ref();17 let b = other.as_ref();
@@ -19,21 +19,21 @@ impl<'a, T: ?Sized + PartialEq> PartialEq for ArcCow<'a, T> { · 1 unmodified line
19 }19 }
20}20}
21 21
22impl<'a, T: ?Sized + PartialOrd> PartialOrd for ArcCow<'a, T> {22impl<T: ?Sized + PartialOrd> PartialOrd for ArcCow<'_, T> {
23 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {23 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
24 self.as_ref().partial_cmp(other.as_ref())24 self.as_ref().partial_cmp(other.as_ref())
25 }25 }
26}26}
27 27
28impl<'a, T: ?Sized + Ord> Ord for ArcCow<'a, T> {28impl<T: ?Sized + Ord> Ord for ArcCow<'_, T> {
29 fn cmp(&self, other: &Self) -> Ordering {29 fn cmp(&self, other: &Self) -> Ordering {
30 self.as_ref().cmp(other.as_ref())30 self.as_ref().cmp(other.as_ref())
31 }31 }
32}32}
33 33
34impl<'a, T: ?Sized + Eq> Eq for ArcCow<'a, T> {}34impl<T: ?Sized + Eq> Eq for ArcCow<'_, T> {}
35 35
36impl<'a, T: ?Sized + Hash> Hash for ArcCow<'a, T> {36impl<T: ?Sized + Hash> Hash for ArcCow<'_, T> {
37 fn hash<H: Hasher>(&self, state: &mut H) {37 fn hash<H: Hasher>(&self, state: &mut H) {
38 match self {38 match self {
39 Self::Borrowed(borrowed) => Hash::hash(borrowed, state),39 Self::Borrowed(borrowed) => Hash::hash(borrowed, state),
@@ -42,7 +42,7 @@ impl<'a, T: ?Sized + Hash> Hash for ArcCow<'a, T> { · 2 unmodified lines
42 }42 }
43}43}
44 44
45impl<'a, T: ?Sized> Clone for ArcCow<'a, T> {45impl<T: ?Sized> Clone for ArcCow<'_, T> {
46 fn clone(&self) -> Self {46 fn clone(&self) -> Self {
47 match self {47 match self {
48 Self::Borrowed(borrowed) => Self::Borrowed(borrowed),48 Self::Borrowed(borrowed) => Self::Borrowed(borrowed),
@@ -102,7 +102,7 @@ impl<'a> From<&'a str> for ArcCow<'a, [u8]> { · 53 unmodified lines
102 }102 }
103}103}
104 104
105impl<'a, T: ?Sized + ToOwned> std::borrow::Borrow<T> for ArcCow<'a, T> {105impl<T: ?Sized + ToOwned> std::borrow::Borrow<T> for ArcCow<'_, T> {
106 fn borrow(&self) -> &T {106 fn borrow(&self) -> &T {
107 match self {107 match self {
108 ArcCow::Borrowed(borrowed) => borrowed,108 ArcCow::Borrowed(borrowed) => borrowed,
@@ -131,7 +131,7 @@ impl<T: ?Sized> AsRef<T> for ArcCow<'_, T> { · 22 unmodified lines
131 }131 }
132}132}
133 133
134impl<'a, T: ?Sized + Debug> Debug for ArcCow<'a, T> {134impl<T: ?Sized + Debug> Debug for ArcCow<'_, T> {
135 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {135 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
136 match self {136 match self {
137 ArcCow::Borrowed(borrowed) => Debug::fmt(borrowed, f),137 ArcCow::Borrowed(borrowed) => Debug::fmt(borrowed, f),
crates/util/src/util.rs+1−1
@@ -781,7 +781,7 @@ impl Ord for NumericPrefixWithSuffix<'_> { · 780 unmodified lines
781 }781 }
782}782}
783 783
784impl<'a> PartialOrd for NumericPrefixWithSuffix<'a> {784impl PartialOrd for NumericPrefixWithSuffix<'_> {
785 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {785 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
786 Some(self.cmp(other))786 Some(self.cmp(other))
787 }787 }
crates/worktree/src/worktree.rs+15−17
@@ -1498,9 +1498,7 @@ impl LocalWorktree { · 1497 unmodified lines
1498 };1498 };
1499 1499
1500 scanner1500 scanner
1501 .run(Box::pin(1501 .run(Box::pin(events.map(|events| events.into_iter().collect())))
1502 events.map(|events| events.into_iter().map(Into::into).collect()),
1503 ))
1504 .await;1502 .await;
1505 }1503 }
1506 });1504 });
@@ -3630,7 +3628,7 @@ impl fmt::Debug for Snapshot { · 2123 unmodified lines
3630 struct EntriesById<'a>(&'a SumTree<PathEntry>);3628 struct EntriesById<'a>(&'a SumTree<PathEntry>);
3631 struct EntriesByPath<'a>(&'a SumTree<Entry>);3629 struct EntriesByPath<'a>(&'a SumTree<Entry>);
3632 3630
3633 impl<'a> fmt::Debug for EntriesByPath<'a> {3631 impl fmt::Debug for EntriesByPath<'_> {
3634 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {3632 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3635 f.debug_map()3633 f.debug_map()
3636 .entries(self.0.iter().map(|entry| (&entry.path, entry.id)))3634 .entries(self.0.iter().map(|entry| (&entry.path, entry.id)))
@@ -3638,7 +3636,7 @@ impl fmt::Debug for Snapshot { · 1 unmodified line
3638 }3636 }
3639 }3637 }
3640 3638
3641 impl<'a> fmt::Debug for EntriesById<'a> {3639 impl fmt::Debug for EntriesById<'_> {
3642 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {3640 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3643 f.debug_list().entries(self.0.iter()).finish()3641 f.debug_list().entries(self.0.iter()).finish()
3644 }3642 }
@@ -5922,7 +5920,7 @@ struct TraversalProgress<'a> { · 2277 unmodified lines
5922 non_ignored_file_count: usize,5920 non_ignored_file_count: usize,
5923}5921}
5924 5922
5925impl<'a> TraversalProgress<'a> {5923impl TraversalProgress<'_> {
5926 fn count(&self, include_files: bool, include_dirs: bool, include_ignored: bool) -> usize {5924 fn count(&self, include_files: bool, include_dirs: bool, include_ignored: bool) -> usize {
5927 match (include_files, include_dirs, include_ignored) {5925 match (include_files, include_dirs, include_ignored) {
5928 (true, true, true) => self.count,5926 (true, true, true) => self.count,
@@ -5950,7 +5948,7 @@ impl<'a> sum_tree::Dimension<'a, EntrySummary> for TraversalProgress<'a> { · 21 unmodified lines
5950 }5948 }
5951}5949}
5952 5950
5953impl<'a> Default for TraversalProgress<'a> {5951impl Default for TraversalProgress<'_> {
5954 fn default() -> Self {5952 fn default() -> Self {
5955 Self {5953 Self {
5956 max_path: Path::new(""),5954 max_path: Path::new(""),
@@ -5968,7 +5966,7 @@ pub struct GitEntryRef<'a> { · 11 unmodified lines
5968 pub git_summary: GitSummary,5966 pub git_summary: GitSummary,
5969}5967}
5970 5968
5971impl<'a> GitEntryRef<'a> {5969impl GitEntryRef<'_> {
5972 pub fn to_owned(&self) -> GitEntry {5970 pub fn to_owned(&self) -> GitEntry {
5973 GitEntry {5971 GitEntry {
5974 entry: self.entry.clone(),5972 entry: self.entry.clone(),
@@ -5977,7 +5975,7 @@ impl<'a> GitEntryRef<'a> { · 2 unmodified lines
5977 }5975 }
5978}5976}
5979 5977
5980impl<'a> Deref for GitEntryRef<'a> {5978impl Deref for GitEntryRef<'_> {
5981 type Target = Entry;5979 type Target = Entry;
5982 5980
5983 fn deref(&self) -> &Self::Target {5981 fn deref(&self) -> &Self::Target {
@@ -5985,7 +5983,7 @@ impl<'a> Deref for GitEntryRef<'a> { · 1 unmodified line
5985 }5983 }
5986}5984}
5987 5985
5988impl<'a> AsRef<Entry> for GitEntryRef<'a> {5986impl AsRef<Entry> for GitEntryRef<'_> {
5989 fn as_ref(&self) -> &Entry {5987 fn as_ref(&self) -> &Entry {
5990 self.entry5988 self.entry
5991 }5989 }
@@ -6246,7 +6244,7 @@ enum PathTarget<'a> { · 254 unmodified lines
6246 Successor(&'a Path),6244 Successor(&'a Path),
6247}6245}
6248 6246
6249impl<'a> PathTarget<'a> {6247impl PathTarget<'_> {
6250 fn cmp_path(&self, other: &Path) -> Ordering {6248 fn cmp_path(&self, other: &Path) -> Ordering {
6251 match self {6249 match self {
6252 PathTarget::Path(path) => path.cmp(&other),6250 PathTarget::Path(path) => path.cmp(&other),
@@ -6261,20 +6259,20 @@ impl<'a> PathTarget<'a> { · 8 unmodified lines
6261 }6259 }
6262}6260}
6263 6261
6264impl<'a, 'b, S: Summary> SeekTarget<'a, PathSummary<S>, PathProgress<'a>> for PathTarget<'b> {6262impl<'a, S: Summary> SeekTarget<'a, PathSummary<S>, PathProgress<'a>> for PathTarget<'_> {
6265 fn cmp(&self, cursor_location: &PathProgress<'a>, _: &S::Context) -> Ordering {6263 fn cmp(&self, cursor_location: &PathProgress<'a>, _: &S::Context) -> Ordering {
6266 self.cmp_path(&cursor_location.max_path)6264 self.cmp_path(&cursor_location.max_path)
6267 }6265 }
6268}6266}
6269 6267
6270impl<'a, 'b, S: Summary> SeekTarget<'a, PathSummary<S>, TraversalProgress<'a>> for PathTarget<'b> {6268impl<'a, S: Summary> SeekTarget<'a, PathSummary<S>, TraversalProgress<'a>> for PathTarget<'_> {
6271 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &S::Context) -> Ordering {6269 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &S::Context) -> Ordering {
6272 self.cmp_path(&cursor_location.max_path)6270 self.cmp_path(&cursor_location.max_path)
6273 }6271 }
6274}6272}
6275 6273
6276impl<'a, 'b> SeekTarget<'a, PathSummary<GitSummary>, (TraversalProgress<'a>, GitSummary)>6274impl<'a> SeekTarget<'a, PathSummary<GitSummary>, (TraversalProgress<'a>, GitSummary)>
6277 for PathTarget<'b>6275 for PathTarget<'_>
6278{6276{
6279 fn cmp(&self, cursor_location: &(TraversalProgress<'a>, GitSummary), _: &()) -> Ordering {6277 fn cmp(&self, cursor_location: &(TraversalProgress<'a>, GitSummary), _: &()) -> Ordering {
6280 self.cmp_path(&cursor_location.0.max_path)6278 self.cmp_path(&cursor_location.0.max_path)
@@ -6317,13 +6315,13 @@ impl<'a> TraversalTarget<'a> { · 36 unmodified lines
6317 }6315 }
6318}6316}
6319 6317
6320impl<'a, 'b> SeekTarget<'a, EntrySummary, TraversalProgress<'a>> for TraversalTarget<'b> {6318impl<'a> SeekTarget<'a, EntrySummary, TraversalProgress<'a>> for TraversalTarget<'_> {
6321 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &()) -> Ordering {6319 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &()) -> Ordering {
6322 self.cmp_progress(cursor_location)6320 self.cmp_progress(cursor_location)
6323 }6321 }
6324}6322}
6325 6323
6326impl<'a, 'b> SeekTarget<'a, PathSummary<Unit>, TraversalProgress<'a>> for TraversalTarget<'b> {6324impl<'a> SeekTarget<'a, PathSummary<Unit>, TraversalProgress<'a>> for TraversalTarget<'_> {
6327 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &()) -> Ordering {6325 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &()) -> Ordering {
6328 self.cmp_progress(cursor_location)6326 self.cmp_progress(cursor_location)
6329 }6327 }
rust-toolchain.toml+1−1
@@ -1,5 +1,5 @@
1[toolchain]1[toolchain]
2channel = "1.81"2channel = "1.85"
3profile = "minimal"3profile = "minimal"
4components = [ "rustfmt", "clippy" ]4components = [ "rustfmt", "clippy" ]
5targets = [ "x86_64-apple-darwin", "aarch64-apple-darwin", "x86_64-unknown-linux-gnu", "wasm32-wasip1", "x86_64-pc-windows-msvc" ]5targets = [ "x86_64-apple-darwin", "aarch64-apple-darwin", "x86_64-unknown-linux-gnu", "wasm32-wasip1", "x86_64-pc-windows-msvc" ]