chore: Bump Rust edition to 2024 (#27800)

Follow-up to https://github.com/zed-industries/zed/pull/27791

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-03-31 20:55:27 +02:00 committed by GitHub
parent d50905e000
commit dc64ec9cc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
802 changed files with 3775 additions and 3662 deletions

View file

@ -6,35 +6,35 @@ use anyhow::Result;
use buffer_diff::{BufferDiff, DiffHunkSecondaryStatus};
use collections::HashSet;
use editor::{
Editor, EditorEvent,
actions::{GoToHunk, GoToPreviousHunk},
scroll::Autoscroll,
Editor, EditorEvent,
};
use futures::StreamExt;
use git::{
Commit, StageAll, StageAndNext, ToggleStaged, UnstageAll, UnstageAndNext,
repository::{Branch, Upstream, UpstreamTracking, UpstreamTrackingStatus},
status::FileStatus,
Commit, StageAll, StageAndNext, ToggleStaged, UnstageAll, UnstageAndNext,
};
use gpui::{
actions, Action, AnyElement, AnyView, App, AppContext as _, AsyncWindowContext, Entity,
EventEmitter, FocusHandle, Focusable, Render, Subscription, Task, WeakEntity,
Action, AnyElement, AnyView, App, AppContext as _, AsyncWindowContext, Entity, EventEmitter,
FocusHandle, Focusable, Render, Subscription, Task, WeakEntity, actions,
};
use language::{Anchor, Buffer, Capability, OffsetRangeExt};
use multi_buffer::{MultiBuffer, PathKey};
use project::{
git_store::{GitEvent, GitStore},
Project, ProjectPath,
git_store::{GitEvent, GitStore},
};
use std::any::{Any, TypeId};
use theme::ActiveTheme;
use ui::{prelude::*, vertical_divider, KeyBinding, Tooltip};
use ui::{KeyBinding, Tooltip, prelude::*, vertical_divider};
use util::ResultExt as _;
use workspace::{
item::{BreadcrumbText, Item, ItemEvent, ItemHandle, TabContentParams},
searchable::SearchableItemHandle,
CloseActiveItem, ItemNavHistory, SerializableItem, ToolbarItemEvent, ToolbarItemLocation,
ToolbarItemView, Workspace,
item::{BreadcrumbText, Item, ItemEvent, ItemHandle, TabContentParams},
searchable::SearchableItemHandle,
};
actions!(git, [Diff, Add]);
@ -1249,41 +1249,43 @@ mod preview {
v_flex()
.gap_6()
.children(vec![example_group(vec![
single_example(
"No Repo",
div()
.w(width)
.h(height)
.child(no_repo_state)
.into_any_element(),
),
single_example(
"No Changes",
div()
.w(width)
.h(height)
.child(no_changes_state)
.into_any_element(),
),
single_example(
"Unknown Upstream",
div()
.w(width)
.h(height)
.child(unknown_upstream_state)
.into_any_element(),
),
single_example(
"Ahead of Remote",
div()
.w(width)
.h(height)
.child(ahead_of_upstream_state)
.into_any_element(),
),
.children(vec![
example_group(vec![
single_example(
"No Repo",
div()
.w(width)
.h(height)
.child(no_repo_state)
.into_any_element(),
),
single_example(
"No Changes",
div()
.w(width)
.h(height)
.child(no_changes_state)
.into_any_element(),
),
single_example(
"Unknown Upstream",
div()
.w(width)
.h(height)
.child(unknown_upstream_state)
.into_any_element(),
),
single_example(
"Ahead of Remote",
div()
.w(width)
.h(height)
.child(ahead_of_upstream_state)
.into_any_element(),
),
])
.vertical(),
])
.vertical()])
.into_any_element()
}
}
@ -1293,7 +1295,7 @@ mod preview {
#[cfg(test)]
mod tests {
use db::indoc;
use editor::test::editor_test_context::{assert_state_with_diff, EditorTestContext};
use editor::test::editor_test_context::{EditorTestContext, assert_state_with_diff};
use gpui::TestAppContext;
use project::FakeFs;
use serde_json::json;