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
240240 timeout-minutes: 60
241241 name: (Windows) Run Clippy and tests
242242 if: github.repository_owner == 'zed-industries'
243− runs-on: hosted-windows-1
243+ runs-on: hosted-windows-2
244244 steps:
245245 # more info here:- https://github.com/rust-lang/cargo/issues/13020
246246 - name: Enable longer pathnames for git
Cargo.toml+3−0
@@ -709,6 +709,9 @@ debug = "full" · 708 unmodified lines
709709 lto = false
710710 codegen-units = 16
711711
712+[workspace.lints.rust]
713+unexpected_cfgs = { level = "allow" }
714+
712715 [workspace.lints.clippy]
713716 dbg_macro = "deny"
714717 todo = "deny"
crates/buffer_diff/src/buffer_diff.rs+1−1
@@ -109,7 +109,7 @@ impl sum_tree::Summary for DiffHunkSummary { · 108 unmodified lines
109109 }
110110 }
111111
112−impl<'a> sum_tree::SeekTarget<'a, DiffHunkSummary, DiffHunkSummary> for Anchor {
112+impl sum_tree::SeekTarget<'_, DiffHunkSummary, DiffHunkSummary> for Anchor {
113113 fn cmp(&self, cursor_location: &DiffHunkSummary, buffer: &text::BufferSnapshot) -> Ordering {
114114 if self
115115 .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
4848 channels_by_id: &'a mut BTreeMap<ChannelId, Arc<Channel>>,
4949 }
5050
51−impl<'a> ChannelPathsInsertGuard<'a> {
51+impl ChannelPathsInsertGuard<'_> {
5252 pub fn insert(&mut self, channel_proto: proto::Channel) -> bool {
5353 let mut ret = false;
5454 let parent_path = channel_proto
@@ -86,7 +86,7 @@ impl<'a> ChannelPathsInsertGuard<'a> { · 31 unmodified lines
8686 }
8787 }
8888
89−impl<'a> Drop for ChannelPathsInsertGuard<'a> {
89+impl Drop for ChannelPathsInsertGuard<'_> {
9090 fn drop(&mut self) {
9191 self.channels_ordered.sort_by(|a, b| {
9292 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
202202 .await
203203 }
204204
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>>> {
206206 self.transaction(|tx| async move {
207207 let mut extension_external_ids_by_id = HashMap::default();
208208
crates/collab/src/rpc.rs+3−3
@@ -975,7 +975,7 @@ impl Server { · 974 unmodified lines
975975 }
976976 }
977977
978−impl<'a> Deref for ConnectionPoolGuard<'a> {
978+impl Deref for ConnectionPoolGuard<'_> {
979979 type Target = ConnectionPool;
980980
981981 fn deref(&self) -> &Self::Target {
@@ -983,13 +983,13 @@ impl<'a> Deref for ConnectionPoolGuard<'a> { · 1 unmodified line
983983 }
984984 }
985985
986−impl<'a> DerefMut for ConnectionPoolGuard<'a> {
986+impl DerefMut for ConnectionPoolGuard<'_> {
987987 fn deref_mut(&mut self) -> &mut Self::Target {
988988 &mut self.guard
989989 }
990990 }
991991
992−impl<'a> Drop for ConnectionPoolGuard<'a> {
992+impl Drop for ConnectionPoolGuard<'_> {
993993 fn drop(&mut self) {
994994 #[cfg(test)]
995995 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
2727 {
2828 struct Visitor;
2929
30− impl<'de> serde::de::Visitor<'de> for Visitor {
30+ impl serde::de::Visitor<'_> for Visitor {
3131 type Value = ChatPanelButton;
3232
3333 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
411411
412412 match serde_json::from_str::<ResponseEvent>(line) {
413413 Ok(response) => {
414− if response.choices.first().is_none()
414+ if response.choices.is_empty()
415415 || response.choices.first().unwrap().finish_reason.is_some()
416416 {
417417 None
crates/editor/src/display_map/block_map.rs+7−7
@@ -999,7 +999,7 @@ impl std::ops::DerefMut for BlockPoint { · 998 unmodified lines
999999 }
10001000 }
10011001
1002−impl<'a> Deref for BlockMapReader<'a> {
1002+impl Deref for BlockMapReader<'_> {
10031003 type Target = BlockSnapshot;
10041004
10051005 fn deref(&self) -> &Self::Target {
@@ -1007,13 +1007,13 @@ impl<'a> Deref for BlockMapReader<'a> { · 1 unmodified line
10071007 }
10081008 }
10091009
1010−impl<'a> DerefMut for BlockMapReader<'a> {
1010+impl DerefMut for BlockMapReader<'_> {
10111011 fn deref_mut(&mut self) -> &mut Self::Target {
10121012 &mut self.snapshot
10131013 }
10141014 }
10151015
1016−impl<'a> BlockMapReader<'a> {
1016+impl BlockMapReader<'_> {
10171017 pub fn row_for_block(&self, block_id: CustomBlockId) -> Option<BlockRow> {
10181018 let block = self.blocks.iter().find(|block| block.id == block_id)?;
10191019 let buffer_row = block
@@ -1053,7 +1053,7 @@ impl<'a> BlockMapReader<'a> { · 33 unmodified lines
10531053 }
10541054 }
10551055
1056−impl<'a> BlockMapWriter<'a> {
1056+impl BlockMapWriter<'_> {
10571057 pub fn insert(
10581058 &mut self,
10591059 blocks: impl IntoIterator<Item = BlockProperties<Anchor>>,
@@ -1740,7 +1740,7 @@ impl BlockSnapshot { · 680 unmodified lines
17401740 }
17411741 }
17421742
1743−impl<'a> BlockChunks<'a> {
1743+impl BlockChunks<'_> {
17441744 /// Go to the next transform
17451745 fn advance(&mut self) {
17461746 self.input_chunk = Chunk::default();
@@ -1856,7 +1856,7 @@ impl<'a> Iterator for BlockChunks<'a> { · 109 unmodified lines
18561856 }
18571857 }
18581858
1859−impl<'a> Iterator for BlockRows<'a> {
1859+impl Iterator for BlockRows<'_> {
18601860 type Item = RowInfo;
18611861
18621862 fn next(&mut self) -> Option<Self::Item> {
@@ -1952,7 +1952,7 @@ impl<'a> sum_tree::Dimension<'a, TransformSummary> for BlockRow { · 89 unmodified lines
19521952 }
19531953 }
19541954
1955−impl<'a> Deref for BlockContext<'a, '_> {
1955+impl Deref for BlockContext<'_, '_> {
19561956 type Target = App;
19571957
19581958 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
132132
133133 pub(crate) struct FoldMapWriter<'a>(&'a mut FoldMap);
134134
135−impl<'a> FoldMapWriter<'a> {
135+impl FoldMapWriter<'_> {
136136 pub(crate) fn fold<T: ToOffset>(
137137 &mut self,
138138 ranges: impl IntoIterator<Item = (Range<T>, FoldPlaceholder)>,
@@ -1121,7 +1121,7 @@ impl<'a> sum_tree::Dimension<'a, FoldSummary> for FoldRange { · 982 unmodified lines
11211121 }
11221122 }
11231123
1124−impl<'a> sum_tree::SeekTarget<'a, FoldSummary, FoldRange> for FoldRange {
1124+impl sum_tree::SeekTarget<'_, FoldSummary, FoldRange> for FoldRange {
11251125 fn cmp(&self, other: &Self, buffer: &MultiBufferSnapshot) -> Ordering {
11261126 AnchorRangeExt::cmp(&self.0, &other.0, buffer)
11271127 }
@@ -1144,7 +1144,7 @@ pub struct FoldRows<'a> { · 16 unmodified lines
11441144 fold_point: FoldPoint,
11451145 }
11461146
1147−impl<'a> FoldRows<'a> {
1147+impl FoldRows<'_> {
11481148 pub(crate) fn seek(&mut self, row: u32) {
11491149 let fold_point = FoldPoint::new(row, 0);
11501150 self.cursor.seek(&fold_point, Bias::Left, &());
@@ -1155,7 +1155,7 @@ impl<'a> FoldRows<'a> { · 4 unmodified lines
11551155 }
11561156 }
11571157
1158−impl<'a> Iterator for FoldRows<'a> {
1158+impl Iterator for FoldRows<'_> {
11591159 type Item = RowInfo;
11601160
11611161 fn next(&mut self) -> Option<Self::Item> {
@@ -1190,7 +1190,7 @@ pub struct FoldChunks<'a> { · 28 unmodified lines
11901190 max_output_offset: FoldOffset,
11911191 }
11921192
1193−impl<'a> FoldChunks<'a> {
1193+impl FoldChunks<'_> {
11941194 pub(crate) fn seek(&mut self, range: Range<FoldOffset>) {
11951195 self.transform_cursor.seek(&range.start, Bias::Right, &());
11961196
crates/editor/src/display_map/inlay_map.rs+3−3
@@ -215,7 +215,7 @@ pub struct InlayChunks<'a> { · 214 unmodified lines
215215 snapshot: &'a InlaySnapshot,
216216 }
217217
218−impl<'a> InlayChunks<'a> {
218+impl InlayChunks<'_> {
219219 pub fn seek(&mut self, new_range: Range<InlayOffset>) {
220220 self.transforms.seek(&new_range.start, Bias::Right, &());
221221
@@ -341,7 +341,7 @@ impl<'a> Iterator for InlayChunks<'a> { · 119 unmodified lines
341341 }
342342 }
343343
344−impl<'a> InlayBufferRows<'a> {
344+impl InlayBufferRows<'_> {
345345 pub fn seek(&mut self, row: u32) {
346346 let inlay_point = InlayPoint::new(row, 0);
347347 self.transforms.seek(&inlay_point, Bias::Left, &());
@@ -363,7 +363,7 @@ impl<'a> InlayBufferRows<'a> { · 15 unmodified lines
363363 }
364364 }
365365
366−impl<'a> Iterator for InlayBufferRows<'a> {
366+impl Iterator for InlayBufferRows<'_> {
367367 type Item = RowInfo;
368368
369369 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
498498 inside_leading_tab: bool,
499499 }
500500
501−impl<'a> TabChunks<'a> {
501+impl TabChunks<'_> {
502502 pub(crate) fn seek(&mut self, range: Range<TabPoint>) {
503503 let (input_start, expanded_char_column, to_next_stop) =
504504 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
6969 transforms: Cursor<'a, Transform, (WrapPoint, TabPoint)>,
7070 }
7171
72−impl<'a> WrapRows<'a> {
72+impl WrapRows<'_> {
7373 pub(crate) fn seek(&mut self, start_row: u32) {
7474 self.transforms
7575 .seek(&WrapPoint::new(start_row, 0), Bias::Left, &());
@@ -872,7 +872,7 @@ impl WrapSnapshot { · 796 unmodified lines
872872 }
873873 }
874874
875−impl<'a> WrapChunks<'a> {
875+impl WrapChunks<'_> {
876876 pub(crate) fn seek(&mut self, rows: Range<u32>) {
877877 let output_start = WrapPoint::new(rows.start, 0);
878878 let output_end = WrapPoint::new(rows.end, 0);
@@ -955,7 +955,7 @@ impl<'a> Iterator for WrapChunks<'a> { · 76 unmodified lines
955955 }
956956 }
957957
958−impl<'a> Iterator for WrapRows<'a> {
958+impl Iterator for WrapRows<'_> {
959959 type Item = RowInfo;
960960
961961 fn next(&mut self) -> Option<Self::Item> {
@@ -1120,7 +1120,7 @@ impl<'a> sum_tree::Dimension<'a, TransformSummary> for TabPoint { · 158 unmodified lines
11201120 }
11211121 }
11221122
1123−impl<'a> sum_tree::SeekTarget<'a, TransformSummary, TransformSummary> for TabPoint {
1123+impl sum_tree::SeekTarget<'_, TransformSummary, TransformSummary> for TabPoint {
11241124 fn cmp(&self, cursor_location: &TransformSummary, _: &()) -> std::cmp::Ordering {
11251125 Ord::cmp(&self.0, &cursor_location.input.lines)
11261126 }
crates/editor/src/editor.rs+1−1
@@ -17393,7 +17393,7 @@ impl Focusable for Editor { · 17392 unmodified lines
1739317393 }
1739417394
1739517395 impl 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 {
1739717397 let settings = ThemeSettings::get_global(cx);
1739817398
1739917399 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
177177 {
178178 struct Visitor;
179179
180− impl<'de> serde::de::Visitor<'de> for Visitor {
180+ impl serde::de::Visitor<'_> for Visitor {
181181 type Value = ScrollbarDiagnostics;
182182
183183 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
238238 }
239239
240240 /// Returns a position of the end of line.
241−
241+///
242242 /// If `stop_at_soft_boundaries` is true, the returned position is that of the
243243 /// displayed line (e.g. it could actually be in the middle of a text line if that line is soft-wrapped).
244244 /// 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
843843 }
844844 }
845845
846−impl<'a> Deref for MutableSelectionsCollection<'a> {
846+impl Deref for MutableSelectionsCollection<'_> {
847847 type Target = SelectionsCollection;
848848 fn deref(&self) -> &Self::Target {
849849 self.collection
850850 }
851851 }
852852
853−impl<'a> DerefMut for MutableSelectionsCollection<'a> {
853+impl DerefMut for MutableSelectionsCollection<'_> {
854854 fn deref_mut(&mut self) -> &mut Self::Target {
855855 self.collection
856856 }
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
181181 }
182182
183183 fn 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+ }
185188 }
186189
187190 static 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
7878 if e.dev {
7979 return true;
8080 }
81− !self
82− .loaded_extensions
81+ self.loaded_extensions
8382 .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())
8584 })
8685 .collect();
8786
crates/extension_host/src/wasm_host/wit.rs+2−2
@@ -348,7 +348,7 @@ impl Extension { · 347 unmodified lines
348348 .call_labels_for_completions(
349349 store,
350350 &language_server_id.0,
351− &completions.into_iter().map(Into::into).collect::<Vec<_>>(),
351+ &completions.into_iter().collect::<Vec<_>>(),
352352 )
353353 .await?
354354 .map(|labels| {
@@ -402,7 +402,7 @@ impl Extension { · 47 unmodified lines
402402 .call_labels_for_symbols(
403403 store,
404404 &language_server_id.0,
405− &symbols.into_iter().map(Into::into).collect::<Vec<_>>(),
405+ &symbols.into_iter().collect::<Vec<_>>(),
406406 )
407407 .await?
408408 .map(|labels| {
crates/file_finder/src/file_finder.rs+4−4
@@ -1451,9 +1451,9 @@ impl<'a> PathComponentSlice<'a> { · 1450 unmodified lines
14511451 matches.next();
14521452 }
14531453 if is_first_normal || is_last || !is_normal || contains_match {
1454− if !longest
1454+ if longest
14551455 .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)
14571457 {
14581458 longest = Some(cur);
14591459 }
@@ -1462,9 +1462,9 @@ impl<'a> PathComponentSlice<'a> { · 2 unmodified lines
14621462 cur.end = i + 1;
14631463 }
14641464 }
1465− if !longest
1465+ if longest
14661466 .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)
14681468 {
14691469 longest = Some(cur);
14701470 }
crates/file_finder/src/new_path_prompt.rs+7−7
@@ -108,7 +108,7 @@ impl Match { · 107 unmodified lines
108108 fn styled_text(&self, project: &Project, window: &Window, cx: &App) -> StyledText {
109109 let mut text = "./".to_string();
110110 let mut highlights = Vec::new();
111− let mut offset = text.as_bytes().len();
111+ let mut offset = text.len();
112112
113113 let separator = '/';
114114 let dir_indicator = "[…]";
@@ -125,7 +125,7 @@ impl Match { · 10 unmodified lines
125125 highlights.push((range.start + offset..range.end + offset, style))
126126 }
127127 text.push(separator);
128− offset = text.as_bytes().len();
128+ offset = text.len();
129129
130130 if let Some(suffix) = &self.suffix {
131131 text.push_str(suffix);
@@ -140,10 +140,10 @@ impl Match { · 8 unmodified lines
140140 Color::Created
141141 };
142142 highlights.push((
143− offset..offset + suffix.as_bytes().len(),
143+ offset..offset + suffix.len(),
144144 HighlightStyle::color(color.color(cx)),
145145 ));
146− offset += suffix.as_bytes().len();
146+ offset += suffix.len();
147147 if entry.is_some_and(|e| e.is_dir()) {
148148 text.push(separator);
149149 offset += separator.len_utf8();
@@ -165,7 +165,7 @@ impl Match { · 15 unmodified lines
165165 text.push_str(suffix);
166166 let existing_prefix_len = self
167167 .existing_prefix(project, cx)
168− .map(|prefix| prefix.to_string_lossy().as_bytes().len())
168+ .map(|prefix| prefix.to_string_lossy().len())
169169 .unwrap_or(0);
170170
171171 if existing_prefix_len > 0 {
@@ -175,14 +175,14 @@ impl Match { · 3 unmodified lines
175175 ));
176176 }
177177 highlights.push((
178− offset + existing_prefix_len..offset + suffix.as_bytes().len(),
178+ offset + existing_prefix_len..offset + suffix.len(),
179179 HighlightStyle::color(if self.entry(project, cx).is_some() {
180180 Color::Conflict.color(cx)
181181 } else {
182182 Color::Created.color(cx)
183183 }),
184184 ));
185− offset += suffix.as_bytes().len();
185+ offset += suffix.len();
186186 if suffix.ends_with('/') {
187187 text.push_str(dir_indicator);
188188 highlights.push((
crates/fs/src/fs.rs+1−1
@@ -1261,7 +1261,7 @@ impl FakeFs { · 1260 unmodified lines
12611261 self.with_git_state(dot_git, true, |state| {
12621262 let branch = branch.map(Into::into);
12631263 state.branches.extend(branch.clone());
1264− state.current_branch_name = branch.map(Into::into)
1264+ state.current_branch_name = branch
12651265 })
12661266 }
12671267
crates/fuzzy/src/paths.rs+1−1
@@ -140,7 +140,7 @@ pub async fn match_path_sets<'a, Set: PathMatchCandidateSet<'a>>( · 139 unmodified lines
140140 let query_char_bag = CharBag::from(&lowercase_query[..]);
141141
142142 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);
144144 let mut segment_results = (0..num_cpus)
145145 .map(|_| Vec::with_capacity(max_results))
146146 .collect::<Vec<_>>();
crates/fuzzy/src/strings.rs+1−1
@@ -145,7 +145,7 @@ pub async fn match_strings( · 144 unmodified lines
145145 let query_char_bag = CharBag::from(&lowercase_query[..]);
146146
147147 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);
149149 let mut segment_results = (0..num_cpus)
150150 .map(|_| Vec::with_capacity(max_results.min(candidates.len())))
151151 .collect::<Vec<_>>();
crates/git/src/blame.rs+1−1
@@ -344,7 +344,7 @@ mod tests { · 343 unmodified lines
344344 have_json.push('\n');
345345
346346 let update = std::env::var("UPDATE_GOLDEN")
347− .map(|val| val.to_ascii_lowercase() == "true")
347+ .map(|val| val.eq_ignore_ascii_case("true"))
348348 .unwrap_or(false);
349349
350350 if update {
crates/git/src/repository.rs+1−1
@@ -1019,7 +1019,7 @@ impl Borrow<Path> for RepoPath { · 1018 unmodified lines
10191019 #[derive(Debug)]
10201020 pub struct RepoPathDescendants<'a>(pub &'a Path);
10211021
1022−impl<'a> MapSeekTarget<RepoPath> for RepoPathDescendants<'a> {
1022+impl MapSeekTarget<RepoPath> for RepoPathDescendants<'_> {
10231023 fn cmp_cursor(&self, key: &RepoPath) -> Ordering {
10241024 if key.starts_with(self.0) {
10251025 Ordering::Greater
crates/git_ui/src/git_panel.rs+1−1
@@ -553,7 +553,7 @@ impl GitPanel { · 552 unmodified lines
553553 }
554554
555555 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() {
557557 self.selected_entry = Some(1);
558558 self.scroll_to_selected_entry(cx);
559559 }
crates/gpui/src/app.rs+2−2
@@ -82,7 +82,7 @@ impl AppCell { · 81 unmodified lines
8282 #[derive(Deref, DerefMut)]
8383 pub struct AppRef<'a>(Ref<'a, App>);
8484
85−impl<'a> Drop for AppRef<'a> {
85+impl Drop for AppRef<'_> {
8686 fn drop(&mut self) {
8787 if option_env!("TRACK_THREAD_BORROWS").is_some() {
8888 let thread_id = std::thread::current().id();
@@ -95,7 +95,7 @@ impl<'a> Drop for AppRef<'a> { · 6 unmodified lines
9595 #[derive(Deref, DerefMut)]
9696 pub struct AppRefMut<'a>(RefMut<'a, App>);
9797
98−impl<'a> Drop for AppRefMut<'a> {
98+impl Drop for AppRefMut<'_> {
9999 fn drop(&mut self) {
100100 if option_env!("TRACK_THREAD_BORROWS").is_some() {
101101 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
649649 }
650650 }
651651
652−impl<'a, T> Context<'a, T> {
652+impl<T> Context<'_, T> {
653653 /// Emit an event of the specified type, which can be handled by other entities that have subscribed via `subscribe` methods on their respective contexts.
654654 pub fn emit<Evt>(&mut self, event: Evt)
655655 where
@@ -664,7 +664,7 @@ impl<'a, T> Context<'a, T> { · 8 unmodified lines
664664 }
665665 }
666666
667−impl<'a, T> AppContext for Context<'a, T> {
667+impl<T> AppContext for Context<'_, T> {
668668 type Result<U> = U;
669669
670670 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
191191 entity_type: PhantomData<T>,
192192 }
193193
194−impl<'a, T: 'static> core::ops::Deref for Lease<'a, T> {
194+impl<T: 'static> core::ops::Deref for Lease<'_, T> {
195195 type Target = T;
196196
197197 fn deref(&self) -> &Self::Target {
@@ -199,13 +199,13 @@ impl<'a, T: 'static> core::ops::Deref for Lease<'a, T> { · 1 unmodified line
199199 }
200200 }
201201
202−impl<'a, T: 'static> core::ops::DerefMut for Lease<'a, T> {
202+impl<T: 'static> core::ops::DerefMut for Lease<'_, T> {
203203 fn deref_mut(&mut self) -> &mut Self::Target {
204204 self.entity.as_mut().unwrap().downcast_mut().unwrap()
205205 }
206206 }
207207
208−impl<'a, T> Drop for Lease<'a, T> {
208+impl<T> Drop for Lease<'_, T> {
209209 fn drop(&mut self) {
210210 if self.entity.is_some() && !panicking() {
211211 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
8282
8383 struct RgbaVisitor;
8484
85−impl<'de> Visitor<'de> for RgbaVisitor {
85+impl Visitor<'_> for RgbaVisitor {
8686 type Value = Rgba;
8787
8888 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -180,7 +180,7 @@ impl TryFrom<&'_ str> for Rgba { · 91 unmodified lines
180180 /// Duplicates a given hex digit.
181181 /// E.g., `0xf` -> `0xff`.
182182 const fn duplicate(value: u8) -> u8 {
183− value << 4 | value
183+ (value << 4) | value
184184 }
185185
186186 (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
946946 }
947947 }
948948
949−impl<'a> sum_tree::SeekTarget<'a, ListItemSummary, ListItemSummary> for Count {
949+impl sum_tree::SeekTarget<'_, ListItemSummary, ListItemSummary> for Count {
950950 fn cmp(&self, other: &ListItemSummary, _: &()) -> std::cmp::Ordering {
951951 self.0.partial_cmp(&other.count).unwrap()
952952 }
953953 }
954954
955−impl<'a> sum_tree::SeekTarget<'a, ListItemSummary, ListItemSummary> for Height {
955+impl sum_tree::SeekTarget<'_, ListItemSummary, ListItemSummary> for Height {
956956 fn cmp(&self, other: &ListItemSummary, _: &()) -> std::cmp::Ordering {
957957 self.0.partial_cmp(&other.height).unwrap()
958958 }
crates/gpui/src/executor.rs+1−1
@@ -587,7 +587,7 @@ impl<'a> Scope<'a> { · 586 unmodified lines
587587 }
588588 }
589589
590−impl<'a> Drop for Scope<'a> {
590+impl Drop for Scope<'_> {
591591 fn drop(&mut self) {
592592 self.tx.take().unwrap();
593593
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
55 /// The `cocoa` crate does not define NSAttributedString (and related Cocoa classes),
66 /// which are needed for copying rich text (that is, text intermingled with images)
77 /// to the clipboard. This adds access to those APIs.
8−
98 #[allow(non_snake_case)]
109 pub trait NSAttributedString: Sized {
1110 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
2626
2727 use dispatch_sys::*;
2828 pub(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
3030 }
3131
3232 pub(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
12211221 unsafe {
12221222 type SetWindowCompositionAttributeType =
12231223 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);
12251225 let user32 = GetModuleHandleA(module_name);
12261226 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);
12281228 let set_window_composition_attribute: SetWindowCompositionAttributeType =
12291229 std::mem::transmute(GetProcAddress(user32.unwrap(), func_name));
12301230 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
12381238 gradient_color: (color.0 as u32)
12391239 | ((color.1 as u32) << 8)
12401240 | ((color.2 as u32) << 16)
1241− | (color.3 as u32) << 24,
1241+ | ((color.3 as u32) << 24),
12421242 animation_id: 0,
12431243 };
12441244 let mut data = WINDOWCOMPOSITIONATTRIBDATA {
crates/gpui/src/text_system.rs+9−0
@@ -670,6 +670,15 @@ pub struct TextRun { · 669 unmodified lines
670670 pub strikethrough: Option<StrikethroughStyle>,
671671 }
672672
673+#[cfg(all(target_os = "macos", test))]
674+impl TextRun {
675+ fn with_len(&self, len: usize) -> Self {
676+ let mut this = self.clone();
677+ this.len = len;
678+ this
679+ }
680+}
681+
673682 /// An identifier for a specific glyph, as returned by [`TextSystem::layout_line`].
674683 #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
675684 #[repr(C)]
crates/gpui/src/text_system/line_layout.rs+4−4
@@ -601,15 +601,15 @@ struct CacheKeyRef<'a> { · 600 unmodified lines
601601 wrap_width: Option<Pixels>,
602602 }
603603
604−impl<'a> PartialEq for (dyn AsCacheKeyRef + 'a) {
604+impl PartialEq for (dyn AsCacheKeyRef + '_) {
605605 fn eq(&self, other: &dyn AsCacheKeyRef) -> bool {
606606 self.as_cache_key_ref() == other.as_cache_key_ref()
607607 }
608608 }
609609
610−impl<'a> Eq for (dyn AsCacheKeyRef + 'a) {}
610+impl Eq for (dyn AsCacheKeyRef + '_) {}
611611
612−impl<'a> Hash for (dyn AsCacheKeyRef + 'a) {
612+impl Hash for (dyn AsCacheKeyRef + '_) {
613613 fn hash<H: Hasher>(&self, state: &mut H) {
614614 self.as_cache_key_ref().hash(state)
615615 }
@@ -644,7 +644,7 @@ impl<'a> Borrow<dyn AsCacheKeyRef + 'a> for Arc<CacheKey> { · 28 unmodified lines
644644 }
645645 }
646646
647−impl<'a> AsCacheKeyRef for CacheKeyRef<'a> {
647+impl AsCacheKeyRef for CacheKeyRef<'_> {
648648 fn as_cache_key_ref(&self) -> CacheKeyRef {
649649 *self
650650 }
crates/gpui/src/text_system/line_wrapper.rs+0−8
@@ -543,14 +543,6 @@ mod tests { · 542 unmodified lines
543543 background_color: None,
544544 };
545545
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−
554546 let text = "aa bbb cccc ddddd eeee".into();
555547 let lines = text_system
556548 .shape_text(
crates/gpui/src/util.rs+1−1
@@ -72,7 +72,7 @@ where · 71 unmodified lines
7272 pub struct CwdBacktrace<'a>(pub &'a backtrace::Backtrace);
7373
7474 #[cfg(any(test, feature = "test-support"))]
75−impl<'a> std::fmt::Debug for CwdBacktrace<'a> {
75+impl std::fmt::Debug for CwdBacktrace<'_> {
7676 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7777 use backtrace::{BacktraceFmt, BytesOrWideString};
7878
crates/gpui/src/window.rs+0−2
@@ -3689,8 +3689,6 @@ impl Window { · 3688 unmodified lines
36893689 dispatch_tree.bindings_for_action(action, &[context])
36903690 }
36913691
3692− /// Returns a generic event listener that invokes the given listener with the view and context associated with the given view handle.
3693−
36943692 /// Returns a generic event listener that invokes the given listener with the view and context associated with the given view handle.
36953693 pub fn listener_for<V: Render, E>(
36963694 &self,
crates/http_client/src/http_client.rs+2−2
@@ -79,7 +79,7 @@ pub trait HttpClient: 'static + Send + Sync { · 78 unmodified lines
7979 .body(body);
8080
8181 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 }),
8383 Err(e) => Box::pin(async move { Err(e.into()) }),
8484 }
8585 }
@@ -96,7 +96,7 @@ pub trait HttpClient: 'static + Send + Sync { · 10 unmodified lines
9696 .body(body);
9797
9898 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 }),
100100 Err(e) => Box::pin(async move { Err(e.into()) }),
101101 }
102102 }
crates/language/src/buffer.rs+3−3
@@ -509,7 +509,7 @@ impl fmt::Debug for ChunkRenderer { · 508 unmodified lines
509509 }
510510 }
511511
512−impl<'a, 'b> Deref for ChunkRendererContext<'a, 'b> {
512+impl Deref for ChunkRendererContext<'_, '_> {
513513 type Target = App;
514514
515515 fn deref(&self) -> &Self::Target {
@@ -517,7 +517,7 @@ impl<'a, 'b> Deref for ChunkRendererContext<'a, 'b> { · 1 unmodified line
517517 }
518518 }
519519
520−impl<'a, 'b> DerefMut for ChunkRendererContext<'a, 'b> {
520+impl DerefMut for ChunkRendererContext<'_, '_> {
521521 fn deref_mut(&mut self) -> &mut Self::Target {
522522 self.context
523523 }
@@ -4137,7 +4137,7 @@ impl Deref for BufferSnapshot { · 3613 unmodified lines
41374137 }
41384138 }
41394139
4140−unsafe impl<'a> Send for BufferChunks<'a> {}
4140+unsafe impl Send for BufferChunks<'_> {}
41414141
41424142 impl<'a> BufferChunks<'a> {
41434143 pub(crate) fn new(
crates/language/src/syntax_map.rs+9−11
@@ -836,7 +836,7 @@ impl SyntaxSnapshot { · 835 unmodified lines
836836 }
837837
838838 #[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>> {
840840 self.layers_for_range(0..buffer.len(), buffer, true)
841841 .collect()
842842 }
@@ -1142,7 +1142,7 @@ impl<'a> SyntaxMapMatches<'a> { · 299 unmodified lines
11421142 }
11431143 }
11441144
1145−impl<'a> SyntaxMapCapturesLayer<'a> {
1145+impl SyntaxMapCapturesLayer<'_> {
11461146 fn advance(&mut self) {
11471147 self.next_capture = self.captures.next().map(|(mat, ix)| mat.captures[*ix]);
11481148 }
@@ -1157,7 +1157,7 @@ impl<'a> SyntaxMapCapturesLayer<'a> { · 8 unmodified lines
11571157 }
11581158 }
11591159
1160−impl<'a> SyntaxMapMatchesLayer<'a> {
1160+impl SyntaxMapMatchesLayer<'_> {
11611161 fn advance(&mut self) {
11621162 if let Some(mat) = self.matches.next() {
11631163 self.next_captures.clear();
@@ -1740,7 +1740,7 @@ impl sum_tree::Summary for SyntaxLayerSummary { · 576 unmodified lines
17401740 }
17411741 }
17421742
1743−impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary> for SyntaxLayerPosition {
1743+impl SeekTarget<'_, SyntaxLayerSummary, SyntaxLayerSummary> for SyntaxLayerPosition {
17441744 fn cmp(&self, cursor_location: &SyntaxLayerSummary, buffer: &BufferSnapshot) -> Ordering {
17451745 Ord::cmp(&self.depth, &cursor_location.max_depth)
17461746 .then_with(|| {
@@ -1758,16 +1758,14 @@ impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary> for SyntaxLayerP · 11 unmodified lines
17581758 }
17591759 }
17601760
1761−impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary> for ChangeStartPosition {
1761+impl SeekTarget<'_, SyntaxLayerSummary, SyntaxLayerSummary> for ChangeStartPosition {
17621762 fn cmp(&self, cursor_location: &SyntaxLayerSummary, text: &BufferSnapshot) -> Ordering {
17631763 Ord::cmp(&self.depth, &cursor_location.max_depth)
17641764 .then_with(|| self.position.cmp(&cursor_location.range.end, text))
17651765 }
17661766 }
17671767
1768−impl<'a> SeekTarget<'a, SyntaxLayerSummary, SyntaxLayerSummary>
1769− for SyntaxLayerPositionBeforeChange
1770−{
1768+impl SeekTarget<'_, SyntaxLayerSummary, SyntaxLayerSummary> for SyntaxLayerPositionBeforeChange {
17711769 fn cmp(&self, cursor_location: &SyntaxLayerSummary, buffer: &BufferSnapshot) -> Ordering {
17721770 if self.change.cmp(cursor_location, buffer).is_le() {
17731771 Ordering::Less
@@ -1869,7 +1867,7 @@ struct LogPoint(Point); · 95 unmodified lines
18691867 struct LogAnchorRange<'a>(&'a Range<Anchor>, &'a text::BufferSnapshot);
18701868 struct LogChangedRegions<'a>(&'a ChangeRegionSet, &'a text::BufferSnapshot);
18711869
1872−impl<'a> fmt::Debug for LogIncludedRanges<'a> {
1870+impl fmt::Debug for LogIncludedRanges<'_> {
18731871 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18741872 f.debug_list()
18751873 .entries(self.0.iter().map(|range| {
@@ -1881,14 +1879,14 @@ impl<'a> fmt::Debug for LogIncludedRanges<'a> { · 5 unmodified lines
18811879 }
18821880 }
18831881
1884−impl<'a> fmt::Debug for LogAnchorRange<'a> {
1882+impl fmt::Debug for LogAnchorRange<'_> {
18851883 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18861884 let range = self.0.to_point(self.1);
18871885 (LogPoint(range.start)..LogPoint(range.end)).fmt(f)
18881886 }
18891887 }
18901888
1891−impl<'a> fmt::Debug for LogChangedRegions<'a> {
1889+impl fmt::Debug for LogChangedRegions<'_> {
18921890 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
18931891 f.debug_list()
18941892 .entries(
crates/language_extension/src/extension_lsp_adapter.rs+1−7
@@ -305,13 +305,7 @@ impl LspAdapter for ExtensionLspAdapter { · 304 unmodified lines
305305 .labels_for_symbols(self.language_server_id.clone(), symbols)
306306 .await?;
307307
308− Ok(labels_from_extension(
309− labels
310− .into_iter()
311− .map(|label| label.map(Into::into))
312− .collect(),
313− language,
314− ))
308+ Ok(labels_from_extension(labels, language))
315309 }
316310 }
317311
crates/language_model/src/model/cloud_model.rs+2−2
@@ -153,8 +153,8 @@ impl LlmApiToken { · 152 unmodified lines
153153 Self::fetch(self.0.write().await, client).await
154154 }
155155
156− async fn fetch<'a>(
157− mut lock: RwLockWriteGuard<'a, Option<String>>,
156+ async fn fetch(
157+ mut lock: RwLockWriteGuard<'_, Option<String>>,
158158 client: &Arc<Client>,
159159 ) -> Result<String> {
160160 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
684684 }
685685 }
686686
687−impl<'a> pet_core::os_environment::Environment for EnvironmentApi<'a> {
687+impl pet_core::os_environment::Environment for EnvironmentApi<'_> {
688688 fn get_user_home(&self) -> Option<PathBuf> {
689689 self.user_home()
690690 }
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
68966896 }
68976897 }
68986898
6899−impl<'a> sum_tree::SeekTarget<'a, ExcerptSummary, ExcerptSummary> for ExcerptOffset {
6899+impl sum_tree::SeekTarget<'_, ExcerptSummary, ExcerptSummary> for ExcerptOffset {
69006900 fn cmp(&self, cursor_location: &ExcerptSummary, _: &()) -> cmp::Ordering {
69016901 Ord::cmp(&self.value, &cursor_location.text.len)
69026902 }
@@ -6908,7 +6908,7 @@ impl<'a> sum_tree::SeekTarget<'a, ExcerptSummary, Option<&'a Locator>> for Locat · 5 unmodified lines
69086908 }
69096909 }
69106910
6911−impl<'a> sum_tree::SeekTarget<'a, ExcerptSummary, ExcerptSummary> for Locator {
6911+impl sum_tree::SeekTarget<'_, ExcerptSummary, ExcerptSummary> for Locator {
69126912 fn cmp(&self, cursor_location: &ExcerptSummary, _: &()) -> cmp::Ordering {
69136913 Ord::cmp(self, &cursor_location.excerpt_locator)
69146914 }
@@ -6982,16 +6982,16 @@ impl<'a> sum_tree::Dimension<'a, DiffTransformSummary> for ExcerptPoint { · 67 unmodified lines
69826982 }
69836983 }
69846984
6985−impl<'a, D: TextDimension + Ord>
6986− sum_tree::SeekTarget<'a, DiffTransformSummary, DiffTransformSummary> for ExcerptDimension<D>
6985+impl<D: TextDimension + Ord> sum_tree::SeekTarget<'_, DiffTransformSummary, DiffTransformSummary>
6986+ for ExcerptDimension<D>
69876987 {
69886988 fn cmp(&self, cursor_location: &DiffTransformSummary, _: &()) -> cmp::Ordering {
69896989 Ord::cmp(&self.0, &D::from_text_summary(&cursor_location.input))
69906990 }
69916991 }
69926992
6993−impl<'a, D: TextDimension + Ord>
6994− sum_tree::SeekTarget<'a, DiffTransformSummary, (OutputDimension<D>, ExcerptDimension<D>)>
6993+impl<D: TextDimension + Ord>
6994+ sum_tree::SeekTarget<'_, DiffTransformSummary, (OutputDimension<D>, ExcerptDimension<D>)>
69956995 for ExcerptDimension<D>
69966996 {
69976997 fn cmp(
@@ -7053,14 +7053,14 @@ impl<'a> sum_tree::Dimension<'a, DiffTransformSummary> for Point { · 55 unmodified lines
70537053 }
70547054 }
70557055
7056−impl<'a> MultiBufferRows<'a> {
7056+impl MultiBufferRows<'_> {
70577057 pub fn seek(&mut self, MultiBufferRow(row): MultiBufferRow) {
70587058 self.point = Point::new(row, 0);
70597059 self.cursor.seek(&self.point);
70607060 }
70617061 }
70627062
7063−impl<'a> Iterator for MultiBufferRows<'a> {
7063+impl Iterator for MultiBufferRows<'_> {
70647064 type Item = RowInfo;
70657065
70667066 fn next(&mut self) -> Option<Self::Item> {
@@ -7304,7 +7304,7 @@ impl<'a> Iterator for MultiBufferChunks<'a> { · 237 unmodified lines
73047304 }
73057305 }
73067306
7307−impl<'a> MultiBufferBytes<'a> {
7307+impl MultiBufferBytes<'_> {
73087308 fn consume(&mut self, len: usize) {
73097309 self.range.start += len;
73107310 self.chunk = &self.chunk[len..];
@@ -7351,7 +7351,7 @@ impl<'a> Iterator for MultiBufferBytes<'a> { · 40 unmodified lines
73517351 }
73527352 }
73537353
7354−impl<'a> io::Read for MultiBufferBytes<'a> {
7354+impl io::Read for MultiBufferBytes<'_> {
73557355 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
73567356 let len = cmp::min(buf.len(), self.chunk.len());
73577357 buf[..len].copy_from_slice(&self.chunk[..len]);
@@ -7362,7 +7362,7 @@ impl<'a> io::Read for MultiBufferBytes<'a> { · 4 unmodified lines
73627362 }
73637363 }
73647364
7365−impl<'a> io::Read for ReversedMultiBufferBytes<'a> {
7365+impl io::Read for ReversedMultiBufferBytes<'_> {
73667366 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
73677367 let len = cmp::min(buf.len(), self.chunk.len());
73687368 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
469469 }
470470 }
471471
472−impl<'a> sum_tree::Dimension<'a, NotificationSummary> for NotificationId {
472+impl sum_tree::Dimension<'_, NotificationSummary> for NotificationId {
473473 fn zero(_cx: &()) -> Self {
474474 Default::default()
475475 }
@@ -480,7 +480,7 @@ impl<'a> sum_tree::Dimension<'a, NotificationSummary> for NotificationId { · 4 unmodified lines
480480 }
481481 }
482482
483−impl<'a> sum_tree::Dimension<'a, NotificationSummary> for Count {
483+impl sum_tree::Dimension<'_, NotificationSummary> for Count {
484484 fn zero(_cx: &()) -> Self {
485485 Default::default()
486486 }
crates/project/src/buffer_store.rs+2−2
@@ -1632,9 +1632,9 @@ impl BufferStore { · 1631 unmodified lines
16321632 // file in the Cargo registry (presumably opened with go-to-definition
16331633 // from a normal Rust file). If so, we can put together a permalink
16341634 // using crate metadata.
1635− if !buffer
1635+ if buffer
16361636 .language()
1637− .is_some_and(|lang| lang.name() == "Rust".into())
1637+ .is_none_or(|lang| lang.name() != "Rust".into())
16381638 {
16391639 return Task::ready(Err(anyhow!("no permalink available")));
16401640 }
crates/rope/src/chunk.rs+1−1
@@ -78,7 +78,7 @@ pub struct ChunkSlice<'a> { · 77 unmodified lines
7878 text: &'a str,
7979 }
8080
81−impl<'a> Into<Chunk> for ChunkSlice<'a> {
81+impl Into<Chunk> for ChunkSlice<'_> {
8282 fn into(self) -> Chunk {
8383 Chunk {
8484 chars: self.chars,
crates/rope/src/point.rs+2−2
@@ -124,8 +124,8 @@ impl PartialOrd for Point { · 123 unmodified lines
124124 impl Ord for Point {
125125 #[cfg(target_pointer_width = "64")]
126126 fn cmp(&self, other: &Point) -> Ordering {
127− let a = (self.row as usize) << 32 | self.column as usize;
128− let b = (other.row as usize) << 32 | other.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;
129129 a.cmp(&b)
130130 }
131131
crates/rope/src/point_utf16.rs+2−2
@@ -104,8 +104,8 @@ impl PartialOrd for PointUtf16 { · 103 unmodified lines
104104 impl Ord for PointUtf16 {
105105 #[cfg(target_pointer_width = "64")]
106106 fn cmp(&self, other: &PointUtf16) -> Ordering {
107− let a = (self.row as usize) << 32 | self.column as usize;
108− let b = (other.row as usize) << 32 | other.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;
109109 a.cmp(&b)
110110 }
111111
crates/rope/src/rope.rs+3−3
@@ -145,7 +145,7 @@ impl Rope { · 144 unmodified lines
145145
146146 // 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
147147 // 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);
149149 let mut new_chunks = Vec::with_capacity(capacity);
150150
151151 while !text.is_empty() {
@@ -855,7 +855,7 @@ impl<'a> Iterator for Bytes<'a> { · 703 unmodified lines
855855 }
856856 }
857857
858−impl<'a> io::Read for Bytes<'a> {
858+impl io::Read for Bytes<'_> {
859859 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
860860 if let Some(chunk) = self.peek() {
861861 let len = cmp::min(buf.len(), chunk.len());
@@ -889,7 +889,7 @@ pub struct Lines<'a> { · 27 unmodified lines
889889 reversed: bool,
890890 }
891891
892−impl<'a> Lines<'a> {
892+impl Lines<'_> {
893893 pub fn next(&mut self) -> Option<&str> {
894894 if self.done {
895895 return None;
crates/search/src/buffer_search.rs+1−1
@@ -1909,7 +1909,7 @@ mod tests { · 1908 unmodified lines
19091909 .unindent();
19101910 let expected_query_matches_count = buffer_text
19111911 .chars()
1912− .filter(|c| c.to_ascii_lowercase() == 'a')
1912+ .filter(|c| c.eq_ignore_ascii_case(&'a'))
19131913 .count();
19141914 assert!(
19151915 expected_query_matches_count > 1,
crates/settings/src/json_schema.rs+1−1
@@ -8,7 +8,7 @@ pub struct SettingsJsonSchemaParams<'a> { · 7 unmodified lines
88 pub font_names: &'a [String],
99 }
1010
11−impl<'a> SettingsJsonSchemaParams<'a> {
11+impl SettingsJsonSchemaParams<'_> {
1212 pub fn font_family_schema(&self) -> Schema {
1313 let available_fonts: Vec<_> = self.font_names.iter().cloned().map(Value::String).collect();
1414
crates/sqlez/src/statement.rs+1−1
@@ -377,7 +377,7 @@ impl<'a> Statement<'a> { · 376 unmodified lines
377377 }
378378 }
379379
380−impl<'a> Drop for Statement<'a> {
380+impl Drop for Statement<'_> {
381381 fn drop(&mut self) {
382382 unsafe {
383383 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
99 position: D,
1010 }
1111
12−impl<'a, T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for StackEntry<'a, T, D> {
12+impl<T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for StackEntry<'_, T, D> {
1313 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1414 f.debug_struct("StackEntry")
1515 .field("index", &self.index)
@@ -27,7 +27,7 @@ pub struct Cursor<'a, T: Item, D> { · 11 unmodified lines
2727 at_end: bool,
2828 }
2929
30−impl<'a, T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for Cursor<'a, T, D>
30+impl<T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for Cursor<'_, T, D>
3131 where
3232 T::Summary: fmt::Debug,
3333 {
@@ -742,14 +742,14 @@ struct SliceSeekAggregate<T: Item> { · 708 unmodified lines
742742
743743 struct SummarySeekAggregate<D>(D);
744744
745−impl<'a, T: Item> SeekAggregate<'a, T> for () {
745+impl<T: Item> SeekAggregate<'_, T> for () {
746746 fn begin_leaf(&mut self) {}
747747 fn end_leaf(&mut self, _: &<T::Summary as Summary>::Context) {}
748748 fn push_item(&mut self, _: &T, _: &T::Summary, _: &<T::Summary as Summary>::Context) {}
749749 fn push_tree(&mut self, _: &SumTree<T>, _: &T::Summary, _: &<T::Summary as Summary>::Context) {}
750750 }
751751
752−impl<'a, T: Item> SeekAggregate<'a, T> for SliceSeekAggregate<T> {
752+impl<T: Item> SeekAggregate<'_, T> for SliceSeekAggregate<T> {
753753 fn begin_leaf(&mut self) {}
754754 fn end_leaf(&mut self, cx: &<T::Summary as Summary>::Context) {
755755 self.tree.append(
crates/sum_tree/src/sum_tree.rs+4−4
@@ -1468,7 +1468,7 @@ mod tests { · 1467 unmodified lines
14681468 }
14691469 }
14701470
1471− impl<'a> Dimension<'a, IntegersSummary> for u8 {
1471+ impl Dimension<'_, IntegersSummary> for u8 {
14721472 fn zero(_cx: &()) -> Self {
14731473 Default::default()
14741474 }
@@ -1478,7 +1478,7 @@ mod tests { · 3 unmodified lines
14781478 }
14791479 }
14801480
1481− impl<'a> Dimension<'a, IntegersSummary> for Count {
1481+ impl Dimension<'_, IntegersSummary> for Count {
14821482 fn zero(_cx: &()) -> Self {
14831483 Default::default()
14841484 }
@@ -1488,13 +1488,13 @@ mod tests { · 3 unmodified lines
14881488 }
14891489 }
14901490
1491− impl<'a> SeekTarget<'a, IntegersSummary, IntegersSummary> for Count {
1491+ impl SeekTarget<'_, IntegersSummary, IntegersSummary> for Count {
14921492 fn cmp(&self, cursor_location: &IntegersSummary, _: &()) -> Ordering {
14931493 self.0.cmp(&cursor_location.count)
14941494 }
14951495 }
14961496
1497− impl<'a> Dimension<'a, IntegersSummary> for Sum {
1497+ impl Dimension<'_, IntegersSummary> for Sum {
14981498 fn zero(_cx: &()) -> Self {
14991499 Default::default()
15001500 }
crates/sum_tree/src/tree_map.rs+1−1
@@ -26,7 +26,7 @@ impl<K> Default for MapKey<K> { · 25 unmodified lines
2626 #[derive(Clone, Debug)]
2727 pub struct MapKeyRef<'a, K>(Option<&'a K>);
2828
29−impl<'a, K> Default for MapKeyRef<'a, K> {
29+impl<K> Default for MapKeyRef<'_, K> {
3030 fn default() -> Self {
3131 Self(None)
3232 }
crates/terminal/src/pty_info.rs+1−4
@@ -123,10 +123,7 @@ impl PtyProcessInfo { · 122 unmodified lines
123123
124124 fn load(&mut self) -> Option<ProcessInfo> {
125125 let process = self.refresh()?;
126− let cwd = process
127− .cwd()
128− .take()
129− .map_or(PathBuf::new(), |p| p.to_owned());
126+ let cwd = process.cwd().map_or(PathBuf::new(), |p| p.to_owned());
130127
131128 let info = ProcessInfo {
132129 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
8181 }
8282 }
8383
84−impl<'a> Add<&'a Self> for OperationSummary {
84+impl Add<&Self> for OperationSummary {
8585 type Output = Self;
8686
8787 fn add(self, other: &Self) -> Self {
@@ -93,7 +93,7 @@ impl<'a> Add<&'a Self> for OperationSummary { · 5 unmodified lines
9393 }
9494 }
9595
96−impl<'a> Dimension<'a, OperationSummary> for OperationKey {
96+impl Dimension<'_, OperationSummary> for OperationKey {
9797 fn zero(_cx: &()) -> Self {
9898 Default::default()
9999 }
crates/text/src/text.rs+6−6
@@ -2533,7 +2533,7 @@ impl<'a> RopeBuilder<'a> { · 2532 unmodified lines
25332533 }
25342534 }
25352535
2536−impl<'a, D: TextDimension + Ord, F: FnMut(&FragmentSummary) -> bool> Iterator for Edits<'a, D, F> {
2536+impl<D: TextDimension + Ord, F: FnMut(&FragmentSummary) -> bool> Iterator for Edits<'_, D, F> {
25372537 type Item = (Edit<D>, Range<Anchor>);
25382538
25392539 fn next(&mut self) -> Option<Self::Item> {
@@ -2801,7 +2801,7 @@ impl ops::Sub for FullOffset { · 261 unmodified lines
28012801 }
28022802 }
28032803
2804−impl<'a> sum_tree::Dimension<'a, FragmentSummary> for usize {
2804+impl sum_tree::Dimension<'_, FragmentSummary> for usize {
28052805 fn zero(_: &Option<clock::Global>) -> Self {
28062806 Default::default()
28072807 }
@@ -2811,7 +2811,7 @@ impl<'a> sum_tree::Dimension<'a, FragmentSummary> for usize { · 3 unmodified lines
28112811 }
28122812 }
28132813
2814−impl<'a> sum_tree::Dimension<'a, FragmentSummary> for FullOffset {
2814+impl sum_tree::Dimension<'_, FragmentSummary> for FullOffset {
28152815 fn zero(_: &Option<clock::Global>) -> Self {
28162816 Default::default()
28172817 }
@@ -2831,7 +2831,7 @@ impl<'a> sum_tree::Dimension<'a, FragmentSummary> for Option<&'a Locator> { · 13 unmodified lines
28312831 }
28322832 }
28332833
2834−impl<'a> sum_tree::SeekTarget<'a, FragmentSummary, FragmentTextSummary> for usize {
2834+impl sum_tree::SeekTarget<'_, FragmentSummary, FragmentTextSummary> for usize {
28352835 fn cmp(
28362836 &self,
28372837 cursor_location: &FragmentTextSummary,
@@ -2880,7 +2880,7 @@ impl<'a> sum_tree::Dimension<'a, FragmentSummary> for VersionedFullOffset { · 42 unmodified lines
28802880 }
28812881 }
28822882
2883−impl<'a> sum_tree::SeekTarget<'a, FragmentSummary, Self> for VersionedFullOffset {
2883+impl sum_tree::SeekTarget<'_, FragmentSummary, Self> for VersionedFullOffset {
28842884 fn cmp(&self, cursor_position: &Self, _: &Option<clock::Global>) -> cmp::Ordering {
28852885 match (self, cursor_position) {
28862886 (Self::Offset(a), Self::Offset(b)) => Ord::cmp(a, b),
@@ -2952,7 +2952,7 @@ impl ToOffset for Anchor { · 65 unmodified lines
29522952 }
29532953 }
29542954
2955−impl<'a, T: ToOffset> ToOffset for &'a T {
2955+impl<T: ToOffset> ToOffset for &T {
29562956 fn to_offset(&self, content: &BufferSnapshot) -> usize {
29572957 (*self).to_offset(content)
29582958 }
crates/util/src/arc_cow.rs+8−8
@@ -11,7 +11,7 @@ pub enum ArcCow<'a, T: ?Sized> { · 10 unmodified lines
1111 Owned(Arc<T>),
1212 }
1313
14−impl<'a, T: ?Sized + PartialEq> PartialEq for ArcCow<'a, T> {
14+impl<T: ?Sized + PartialEq> PartialEq for ArcCow<'_, T> {
1515 fn eq(&self, other: &Self) -> bool {
1616 let a = self.as_ref();
1717 let b = other.as_ref();
@@ -19,21 +19,21 @@ impl<'a, T: ?Sized + PartialEq> PartialEq for ArcCow<'a, T> { · 1 unmodified line
1919 }
2020 }
2121
22−impl<'a, T: ?Sized + PartialOrd> PartialOrd for ArcCow<'a, T> {
22+impl<T: ?Sized + PartialOrd> PartialOrd for ArcCow<'_, T> {
2323 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
2424 self.as_ref().partial_cmp(other.as_ref())
2525 }
2626 }
2727
28−impl<'a, T: ?Sized + Ord> Ord for ArcCow<'a, T> {
28+impl<T: ?Sized + Ord> Ord for ArcCow<'_, T> {
2929 fn cmp(&self, other: &Self) -> Ordering {
3030 self.as_ref().cmp(other.as_ref())
3131 }
3232 }
3333
34−impl<'a, T: ?Sized + Eq> Eq for ArcCow<'a, T> {}
34+impl<T: ?Sized + Eq> Eq for ArcCow<'_, T> {}
3535
36−impl<'a, T: ?Sized + Hash> Hash for ArcCow<'a, T> {
36+impl<T: ?Sized + Hash> Hash for ArcCow<'_, T> {
3737 fn hash<H: Hasher>(&self, state: &mut H) {
3838 match self {
3939 Self::Borrowed(borrowed) => Hash::hash(borrowed, state),
@@ -42,7 +42,7 @@ impl<'a, T: ?Sized + Hash> Hash for ArcCow<'a, T> { · 2 unmodified lines
4242 }
4343 }
4444
45−impl<'a, T: ?Sized> Clone for ArcCow<'a, T> {
45+impl<T: ?Sized> Clone for ArcCow<'_, T> {
4646 fn clone(&self) -> Self {
4747 match self {
4848 Self::Borrowed(borrowed) => Self::Borrowed(borrowed),
@@ -102,7 +102,7 @@ impl<'a> From<&'a str> for ArcCow<'a, [u8]> { · 53 unmodified lines
102102 }
103103 }
104104
105−impl<'a, T: ?Sized + ToOwned> std::borrow::Borrow<T> for ArcCow<'a, T> {
105+impl<T: ?Sized + ToOwned> std::borrow::Borrow<T> for ArcCow<'_, T> {
106106 fn borrow(&self) -> &T {
107107 match self {
108108 ArcCow::Borrowed(borrowed) => borrowed,
@@ -131,7 +131,7 @@ impl<T: ?Sized> AsRef<T> for ArcCow<'_, T> { · 22 unmodified lines
131131 }
132132 }
133133
134−impl<'a, T: ?Sized + Debug> Debug for ArcCow<'a, T> {
134+impl<T: ?Sized + Debug> Debug for ArcCow<'_, T> {
135135 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
136136 match self {
137137 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
781781 }
782782 }
783783
784−impl<'a> PartialOrd for NumericPrefixWithSuffix<'a> {
784+impl PartialOrd for NumericPrefixWithSuffix<'_> {
785785 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
786786 Some(self.cmp(other))
787787 }
crates/worktree/src/worktree.rs+15−17
@@ -1498,9 +1498,7 @@ impl LocalWorktree { · 1497 unmodified lines
14981498 };
14991499
15001500 scanner
1501− .run(Box::pin(
1502− events.map(|events| events.into_iter().map(Into::into).collect()),
1503− ))
1501+ .run(Box::pin(events.map(|events| events.into_iter().collect())))
15041502 .await;
15051503 }
15061504 });
@@ -3630,7 +3628,7 @@ impl fmt::Debug for Snapshot { · 2123 unmodified lines
36303628 struct EntriesById<'a>(&'a SumTree<PathEntry>);
36313629 struct EntriesByPath<'a>(&'a SumTree<Entry>);
36323630
3633− impl<'a> fmt::Debug for EntriesByPath<'a> {
3631+ impl fmt::Debug for EntriesByPath<'_> {
36343632 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
36353633 f.debug_map()
36363634 .entries(self.0.iter().map(|entry| (&entry.path, entry.id)))
@@ -3638,7 +3636,7 @@ impl fmt::Debug for Snapshot { · 1 unmodified line
36383636 }
36393637 }
36403638
3641− impl<'a> fmt::Debug for EntriesById<'a> {
3639+ impl fmt::Debug for EntriesById<'_> {
36423640 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
36433641 f.debug_list().entries(self.0.iter()).finish()
36443642 }
@@ -5922,7 +5920,7 @@ struct TraversalProgress<'a> { · 2277 unmodified lines
59225920 non_ignored_file_count: usize,
59235921 }
59245922
5925−impl<'a> TraversalProgress<'a> {
5923+impl TraversalProgress<'_> {
59265924 fn count(&self, include_files: bool, include_dirs: bool, include_ignored: bool) -> usize {
59275925 match (include_files, include_dirs, include_ignored) {
59285926 (true, true, true) => self.count,
@@ -5950,7 +5948,7 @@ impl<'a> sum_tree::Dimension<'a, EntrySummary> for TraversalProgress<'a> { · 21 unmodified lines
59505948 }
59515949 }
59525950
5953−impl<'a> Default for TraversalProgress<'a> {
5951+impl Default for TraversalProgress<'_> {
59545952 fn default() -> Self {
59555953 Self {
59565954 max_path: Path::new(""),
@@ -5968,7 +5966,7 @@ pub struct GitEntryRef<'a> { · 11 unmodified lines
59685966 pub git_summary: GitSummary,
59695967 }
59705968
5971−impl<'a> GitEntryRef<'a> {
5969+impl GitEntryRef<'_> {
59725970 pub fn to_owned(&self) -> GitEntry {
59735971 GitEntry {
59745972 entry: self.entry.clone(),
@@ -5977,7 +5975,7 @@ impl<'a> GitEntryRef<'a> { · 2 unmodified lines
59775975 }
59785976 }
59795977
5980−impl<'a> Deref for GitEntryRef<'a> {
5978+impl Deref for GitEntryRef<'_> {
59815979 type Target = Entry;
59825980
59835981 fn deref(&self) -> &Self::Target {
@@ -5985,7 +5983,7 @@ impl<'a> Deref for GitEntryRef<'a> { · 1 unmodified line
59855983 }
59865984 }
59875985
5988−impl<'a> AsRef<Entry> for GitEntryRef<'a> {
5986+impl AsRef<Entry> for GitEntryRef<'_> {
59895987 fn as_ref(&self) -> &Entry {
59905988 self.entry
59915989 }
@@ -6246,7 +6244,7 @@ enum PathTarget<'a> { · 254 unmodified lines
62466244 Successor(&'a Path),
62476245 }
62486246
6249−impl<'a> PathTarget<'a> {
6247+impl PathTarget<'_> {
62506248 fn cmp_path(&self, other: &Path) -> Ordering {
62516249 match self {
62526250 PathTarget::Path(path) => path.cmp(&other),
@@ -6261,20 +6259,20 @@ impl<'a> PathTarget<'a> { · 8 unmodified lines
62616259 }
62626260 }
62636261
6264−impl<'a, 'b, S: Summary> SeekTarget<'a, PathSummary<S>, PathProgress<'a>> for PathTarget<'b> {
6262+impl<'a, S: Summary> SeekTarget<'a, PathSummary<S>, PathProgress<'a>> for PathTarget<'_> {
62656263 fn cmp(&self, cursor_location: &PathProgress<'a>, _: &S::Context) -> Ordering {
62666264 self.cmp_path(&cursor_location.max_path)
62676265 }
62686266 }
62696267
6270−impl<'a, 'b, S: Summary> SeekTarget<'a, PathSummary<S>, TraversalProgress<'a>> for PathTarget<'b> {
6268+impl<'a, S: Summary> SeekTarget<'a, PathSummary<S>, TraversalProgress<'a>> for PathTarget<'_> {
62716269 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &S::Context) -> Ordering {
62726270 self.cmp_path(&cursor_location.max_path)
62736271 }
62746272 }
62756273
6276−impl<'a, 'b> SeekTarget<'a, PathSummary<GitSummary>, (TraversalProgress<'a>, GitSummary)>
6277− for PathTarget<'b>
6274+impl<'a> SeekTarget<'a, PathSummary<GitSummary>, (TraversalProgress<'a>, GitSummary)>
6275+ for PathTarget<'_>
62786276 {
62796277 fn cmp(&self, cursor_location: &(TraversalProgress<'a>, GitSummary), _: &()) -> Ordering {
62806278 self.cmp_path(&cursor_location.0.max_path)
@@ -6317,13 +6315,13 @@ impl<'a> TraversalTarget<'a> { · 36 unmodified lines
63176315 }
63186316 }
63196317
6320−impl<'a, 'b> SeekTarget<'a, EntrySummary, TraversalProgress<'a>> for TraversalTarget<'b> {
6318+impl<'a> SeekTarget<'a, EntrySummary, TraversalProgress<'a>> for TraversalTarget<'_> {
63216319 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &()) -> Ordering {
63226320 self.cmp_progress(cursor_location)
63236321 }
63246322 }
63256323
6326−impl<'a, 'b> SeekTarget<'a, PathSummary<Unit>, TraversalProgress<'a>> for TraversalTarget<'b> {
6324+impl<'a> SeekTarget<'a, PathSummary<Unit>, TraversalProgress<'a>> for TraversalTarget<'_> {
63276325 fn cmp(&self, cursor_location: &TraversalProgress<'a>, _: &()) -> Ordering {
63286326 self.cmp_progress(cursor_location)
63296327 }
rust-toolchain.toml+1−1
@@ -1,5 +1,5 @@
11 [toolchain]
2−channel = "1.81"
2+channel = "1.85"
33 profile = "minimal"
44 components = [ "rustfmt", "clippy" ]
55 targets = [ "x86_64-apple-darwin", "aarch64-apple-darwin", "x86_64-unknown-linux-gnu", "wasm32-wasip1", "x86_64-pc-windows-msvc" ]