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

@ -1,9 +1,9 @@
use anyhow::Result;
use async_recursion::async_recursion;
use collections::HashSet;
use futures::{stream::FuturesUnordered, StreamExt as _};
use futures::{StreamExt as _, stream::FuturesUnordered};
use gpui::{AppContext as _, AsyncWindowContext, Axis, Entity, Task, WeakEntity};
use project::{terminals::TerminalKind, Project};
use project::{Project, terminals::TerminalKind};
use serde::{Deserialize, Serialize};
use std::path::{Path, PathBuf};
use ui::{App, Context, Pixels, Window};
@ -16,9 +16,8 @@ use workspace::{
};
use crate::{
default_working_directory,
terminal_panel::{new_terminal_pane, TerminalPanel},
TerminalView,
TerminalView, default_working_directory,
terminal_panel::{TerminalPanel, new_terminal_pane},
};
pub(crate) fn serialize_pane_group(

View file

@ -1,27 +1,28 @@
use editor::{CursorLayout, HighlightedRange, HighlightedRangeLine};
use gpui::{
div, fill, point, px, relative, size, AnyElement, App, AvailableSpace, Bounds, ContentMask,
Context, DispatchPhase, Element, ElementId, Entity, FocusHandle, Font, FontStyle, FontWeight,
GlobalElementId, HighlightStyle, Hitbox, Hsla, InputHandler, InteractiveElement, Interactivity,
IntoElement, LayoutId, ModifiersChangedEvent, MouseButton, MouseMoveEvent, Pixels, Point,
ShapedLine, StatefulInteractiveElement, StrikethroughStyle, Styled, TextRun, TextStyle,
UTF16Selection, UnderlineStyle, WeakEntity, WhiteSpace, Window, WindowTextSystem,
AnyElement, App, AvailableSpace, Bounds, ContentMask, Context, DispatchPhase, Element,
ElementId, Entity, FocusHandle, Font, FontStyle, FontWeight, GlobalElementId, HighlightStyle,
Hitbox, Hsla, InputHandler, InteractiveElement, Interactivity, IntoElement, LayoutId,
ModifiersChangedEvent, MouseButton, MouseMoveEvent, Pixels, Point, ShapedLine,
StatefulInteractiveElement, StrikethroughStyle, Styled, TextRun, TextStyle, UTF16Selection,
UnderlineStyle, WeakEntity, WhiteSpace, Window, WindowTextSystem, div, fill, point, px,
relative, size,
};
use itertools::Itertools;
use language::CursorShape;
use settings::Settings;
use terminal::{
IndexedCell, Terminal, TerminalBounds, TerminalContent,
alacritty_terminal::{
grid::Dimensions,
index::Point as AlacPoint,
term::{cell::Flags, TermMode},
term::{TermMode, cell::Flags},
vte::ansi::{
Color::{self as AnsiColor, Named},
CursorShape as AlacCursorShape, NamedColor,
},
},
terminal_settings::TerminalSettings,
IndexedCell, Terminal, TerminalBounds, TerminalContent,
};
use theme::{ActiveTheme, Theme, ThemeSettings};
use ui::{ParentElement, Tooltip};

View file

@ -1,48 +1,47 @@
use std::{cmp, ops::ControlFlow, path::PathBuf, sync::Arc, time::Duration};
use crate::{
default_working_directory,
TerminalView, default_working_directory,
persistence::{
deserialize_terminal_panel, serialize_pane_group, SerializedItems, SerializedTerminalPanel,
SerializedItems, SerializedTerminalPanel, deserialize_terminal_panel, serialize_pane_group,
},
TerminalView,
};
use breadcrumbs::Breadcrumbs;
use collections::HashMap;
use db::kvp::KEY_VALUE_STORE;
use futures::future::join_all;
use gpui::{
actions, Action, AnyView, App, AsyncApp, AsyncWindowContext, Context, Corner, Entity,
EventEmitter, ExternalPaths, FocusHandle, Focusable, IntoElement, ParentElement, Pixels,
Render, Styled, Task, WeakEntity, Window,
Action, AnyView, App, AsyncApp, AsyncWindowContext, Context, Corner, Entity, EventEmitter,
ExternalPaths, FocusHandle, Focusable, IntoElement, ParentElement, Pixels, Render, Styled,
Task, WeakEntity, Window, actions,
};
use itertools::Itertools;
use project::{terminals::TerminalKind, Fs, Project, ProjectEntryId};
use search::{buffer_search::DivRegistrar, BufferSearchBar};
use project::{Fs, Project, ProjectEntryId, terminals::TerminalKind};
use search::{BufferSearchBar, buffer_search::DivRegistrar};
use settings::Settings;
use task::{RevealStrategy, RevealTarget, ShellBuilder, SpawnInTerminal, TaskId};
use terminal::{
terminal_settings::{TerminalDockPosition, TerminalSettings},
Terminal,
terminal_settings::{TerminalDockPosition, TerminalSettings},
};
use ui::{
prelude::*, ButtonCommon, Clickable, ContextMenu, FluentBuilder, PopoverMenu, Toggleable,
Tooltip,
ButtonCommon, Clickable, ContextMenu, FluentBuilder, PopoverMenu, Toggleable, Tooltip,
prelude::*,
};
use util::{ResultExt, TryFutureExt};
use workspace::{
dock::{DockPosition, Panel, PanelEvent, PanelHandle},
item::SerializableItem,
move_active_item, move_item, pane,
ui::IconName,
ActivateNextPane, ActivatePane, ActivatePaneDown, ActivatePaneLeft, ActivatePaneRight,
ActivatePaneUp, ActivatePreviousPane, DraggedSelection, DraggedTab, ItemId, MoveItemToPane,
MoveItemToPaneInDirection, NewTerminal, Pane, PaneGroup, SplitDirection, SplitDown, SplitLeft,
SplitRight, SplitUp, SwapPaneDown, SwapPaneLeft, SwapPaneRight, SwapPaneUp, ToggleZoom,
Workspace,
dock::{DockPosition, Panel, PanelEvent, PanelHandle},
item::SerializableItem,
move_active_item, move_item, pane,
ui::IconName,
};
use anyhow::{anyhow, Context as _, Result};
use anyhow::{Context as _, Result, anyhow};
use zed_actions::assistant::InlineAssist;
const TERMINAL_PANEL_KEY: &str = "TerminalPanel";

View file

@ -4,9 +4,9 @@ use std::{
rc::Rc,
};
use gpui::{size, Bounds, Point};
use gpui::{Bounds, Point, size};
use terminal::Terminal;
use ui::{px, ContentSize, Pixels, ScrollableHandle};
use ui::{ContentSize, Pixels, ScrollableHandle, px};
#[derive(Debug)]
struct ScrollHandleState {

View file

@ -1,5 +1,5 @@
use gpui::{IntoElement, Render};
use ui::{prelude::*, tooltip_container, Divider};
use ui::{Divider, prelude::*, tooltip_container};
pub struct TerminalTooltip {
title: SharedString,

View file

@ -4,42 +4,42 @@ pub mod terminal_panel;
pub mod terminal_scrollbar;
pub mod terminal_tab_tooltip;
use editor::{actions::SelectAll, scroll::ScrollbarAutoHide, Editor, EditorSettings};
use editor::{Editor, EditorSettings, actions::SelectAll, scroll::ScrollbarAutoHide};
use gpui::{
anchored, deferred, div, impl_actions, AnyElement, App, DismissEvent, Entity, EventEmitter,
FocusHandle, Focusable, KeyContext, KeyDownEvent, Keystroke, MouseButton, MouseDownEvent,
Pixels, Render, ScrollWheelEvent, Stateful, Styled, Subscription, Task, WeakEntity,
AnyElement, App, DismissEvent, Entity, EventEmitter, FocusHandle, Focusable, KeyContext,
KeyDownEvent, Keystroke, MouseButton, MouseDownEvent, Pixels, Render, ScrollWheelEvent,
Stateful, Styled, Subscription, Task, WeakEntity, anchored, deferred, div, impl_actions,
};
use itertools::Itertools;
use persistence::TERMINAL_DB;
use project::{search::SearchQuery, terminals::TerminalKind, Entry, Metadata, Project};
use project::{Entry, Metadata, Project, search::SearchQuery, terminals::TerminalKind};
use schemars::JsonSchema;
use terminal::{
alacritty_terminal::{
index::Point,
term::{search::RegexSearch, TermMode},
},
terminal_settings::{self, CursorShape, TerminalBlink, TerminalSettings, WorkingDirectory},
Clear, Copy, Event, MaybeNavigationTarget, Paste, ScrollLineDown, ScrollLineUp, ScrollPageDown,
ScrollPageUp, ScrollToBottom, ScrollToTop, ShowCharacterPalette, TaskState, TaskStatus,
Terminal, TerminalBounds, ToggleViMode,
alacritty_terminal::{
index::Point,
term::{TermMode, search::RegexSearch},
},
terminal_settings::{self, CursorShape, TerminalBlink, TerminalSettings, WorkingDirectory},
};
use terminal_element::{is_blank, TerminalElement};
use terminal_element::{TerminalElement, is_blank};
use terminal_panel::TerminalPanel;
use terminal_scrollbar::TerminalScrollHandle;
use terminal_tab_tooltip::TerminalTooltip;
use ui::{
h_flex, prelude::*, ContextMenu, Icon, IconName, Label, Scrollbar, ScrollbarState, Tooltip,
ContextMenu, Icon, IconName, Label, Scrollbar, ScrollbarState, Tooltip, h_flex, prelude::*,
};
use util::{debug_panic, paths::PathWithPosition, ResultExt};
use util::{ResultExt, debug_panic, paths::PathWithPosition};
use workspace::{
CloseActiveItem, NewCenterTerminal, NewTerminal, OpenOptions, OpenVisible, ToolbarItemLocation,
Workspace, WorkspaceId,
item::{
BreadcrumbText, Item, ItemEvent, SerializableItem, TabContentParams, TabTooltipContent,
},
register_serializable_item,
searchable::{Direction, SearchEvent, SearchOptions, SearchableItem, SearchableItemHandle},
CloseActiveItem, NewCenterTerminal, NewTerminal, OpenOptions, OpenVisible, ToolbarItemLocation,
Workspace, WorkspaceId,
};
use anyhow::Context as _;