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:
parent
d50905e000
commit
dc64ec9cc8
802 changed files with 3775 additions and 3662 deletions
|
@ -5,35 +5,35 @@ use std::{
|
|||
collections::BTreeMap,
|
||||
hash::Hash,
|
||||
ops::Range,
|
||||
path::{Path, PathBuf, MAIN_SEPARATOR_STR},
|
||||
path::{MAIN_SEPARATOR_STR, Path, PathBuf},
|
||||
sync::{
|
||||
atomic::{self, AtomicBool},
|
||||
Arc, OnceLock,
|
||||
atomic::{self, AtomicBool},
|
||||
},
|
||||
time::Duration,
|
||||
u32,
|
||||
};
|
||||
|
||||
use anyhow::Context as _;
|
||||
use collections::{hash_map, BTreeSet, HashMap, HashSet};
|
||||
use collections::{BTreeSet, HashMap, HashSet, hash_map};
|
||||
use db::kvp::KEY_VALUE_STORE;
|
||||
use editor::{
|
||||
AnchorRangeExt, Bias, DisplayPoint, Editor, EditorEvent, EditorMode, EditorSettings, ExcerptId,
|
||||
ExcerptRange, MultiBufferSnapshot, RangeToAnchorExt, ShowScrollbar,
|
||||
display_map::ToDisplayPoint,
|
||||
items::{entry_git_aware_label_color, entry_label_color},
|
||||
scroll::{Autoscroll, AutoscrollStrategy, ScrollAnchor, ScrollbarAutoHide},
|
||||
AnchorRangeExt, Bias, DisplayPoint, Editor, EditorEvent, EditorMode, EditorSettings, ExcerptId,
|
||||
ExcerptRange, MultiBufferSnapshot, RangeToAnchorExt, ShowScrollbar,
|
||||
};
|
||||
use file_icons::FileIcons;
|
||||
use fuzzy::{match_strings, StringMatch, StringMatchCandidate};
|
||||
use fuzzy::{StringMatch, StringMatchCandidate, match_strings};
|
||||
use gpui::{
|
||||
actions, anchored, deferred, div, point, px, size, uniform_list, Action, AnyElement, App,
|
||||
AppContext as _, AsyncWindowContext, Bounds, ClipboardItem, Context, DismissEvent, Div,
|
||||
ElementId, Entity, EventEmitter, FocusHandle, Focusable, HighlightStyle, InteractiveElement,
|
||||
IntoElement, KeyContext, ListHorizontalSizingBehavior, ListSizingBehavior, MouseButton,
|
||||
MouseDownEvent, ParentElement, Pixels, Point, Render, ScrollStrategy, SharedString, Stateful,
|
||||
StatefulInteractiveElement as _, Styled, Subscription, Task, UniformListScrollHandle,
|
||||
WeakEntity, Window,
|
||||
Action, AnyElement, App, AppContext as _, AsyncWindowContext, Bounds, ClipboardItem, Context,
|
||||
DismissEvent, Div, ElementId, Entity, EventEmitter, FocusHandle, Focusable, HighlightStyle,
|
||||
InteractiveElement, IntoElement, KeyContext, ListHorizontalSizingBehavior, ListSizingBehavior,
|
||||
MouseButton, MouseDownEvent, ParentElement, Pixels, Point, Render, ScrollStrategy,
|
||||
SharedString, Stateful, StatefulInteractiveElement as _, Styled, Subscription, Task,
|
||||
UniformListScrollHandle, WeakEntity, Window, actions, anchored, deferred, div, point, px, size,
|
||||
uniform_list,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use language::{BufferId, BufferSnapshot, OffsetRangeExt, OutlineItem};
|
||||
|
@ -47,18 +47,18 @@ use settings::{Settings, SettingsStore};
|
|||
use smol::channel;
|
||||
use theme::{SyntaxTheme, ThemeSettings};
|
||||
use ui::{DynamicSpacing, IndentGuideColors, IndentGuideLayout};
|
||||
use util::{debug_panic, RangeExt, ResultExt, TryFutureExt};
|
||||
use util::{RangeExt, ResultExt, TryFutureExt, debug_panic};
|
||||
use workspace::{
|
||||
OpenInTerminal, WeakItemHandle, Workspace,
|
||||
dock::{DockPosition, Panel, PanelEvent},
|
||||
item::ItemHandle,
|
||||
searchable::{SearchEvent, SearchableItem},
|
||||
ui::{
|
||||
h_flex, v_flex, ActiveTheme, ButtonCommon, Clickable, Color, ContextMenu, FluentBuilder,
|
||||
HighlightedLabel, Icon, IconButton, IconButtonShape, IconName, IconSize, Label,
|
||||
LabelCommon, ListItem, Scrollbar, ScrollbarState, StyledExt, StyledTypography, Toggleable,
|
||||
Tooltip,
|
||||
ActiveTheme, ButtonCommon, Clickable, Color, ContextMenu, FluentBuilder, HighlightedLabel,
|
||||
Icon, IconButton, IconButtonShape, IconName, IconSize, Label, LabelCommon, ListItem,
|
||||
Scrollbar, ScrollbarState, StyledExt, StyledTypography, Toggleable, Tooltip, h_flex,
|
||||
v_flex,
|
||||
},
|
||||
OpenInTerminal, WeakItemHandle, Workspace,
|
||||
};
|
||||
use worktree::{Entry, ProjectEntryId, WorktreeId};
|
||||
|
||||
|
@ -1767,11 +1767,7 @@ impl OutlinePanel {
|
|||
active_editor.update(cx, |editor, cx| {
|
||||
buffers_to_toggle.retain(|buffer_id| {
|
||||
let folded = editor.is_buffer_folded(*buffer_id, cx);
|
||||
if fold {
|
||||
!folded
|
||||
} else {
|
||||
folded
|
||||
}
|
||||
if fold { !folded } else { folded }
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -5165,7 +5161,7 @@ impl GenerationState {
|
|||
mod tests {
|
||||
use db::indoc;
|
||||
use gpui::{TestAppContext, VisualTestContext, WindowHandle};
|
||||
use language::{tree_sitter_rust, Language, LanguageConfig, LanguageMatcher};
|
||||
use language::{Language, LanguageConfig, LanguageMatcher, tree_sitter_rust};
|
||||
use pretty_assertions::assert_eq;
|
||||
use project::FakeFs;
|
||||
use search::project_search::{self, perform_project_search};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue