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
|
@ -2,17 +2,17 @@ use anyhow::Result;
|
|||
use call::ActiveCall;
|
||||
use channel::{Channel, ChannelBuffer, ChannelBufferEvent, ChannelStore};
|
||||
use client::{
|
||||
proto::{self, PeerId},
|
||||
ChannelId, Collaborator, ParticipantIndex,
|
||||
proto::{self, PeerId},
|
||||
};
|
||||
use collections::HashMap;
|
||||
use editor::{
|
||||
display_map::ToDisplayPoint, scroll::Autoscroll, CollaborationHub, DisplayPoint, Editor,
|
||||
EditorEvent,
|
||||
CollaborationHub, DisplayPoint, Editor, EditorEvent, display_map::ToDisplayPoint,
|
||||
scroll::Autoscroll,
|
||||
};
|
||||
use gpui::{
|
||||
actions, AnyView, App, ClipboardItem, Context, Entity, EventEmitter, Focusable, Pixels, Point,
|
||||
Render, Subscription, Task, VisualContext as _, WeakEntity, Window,
|
||||
AnyView, App, ClipboardItem, Context, Entity, EventEmitter, Focusable, Pixels, Point, Render,
|
||||
Subscription, Task, VisualContext as _, WeakEntity, Window, actions,
|
||||
};
|
||||
use project::Project;
|
||||
use rpc::proto::ChannelVisibility;
|
||||
|
@ -23,12 +23,12 @@ use std::{
|
|||
use ui::prelude::*;
|
||||
use util::ResultExt;
|
||||
use workspace::item::TabContentParams;
|
||||
use workspace::{item::Dedup, notifications::NotificationId};
|
||||
use workspace::{
|
||||
ItemNavHistory, Pane, SaveIntent, Toast, ViewId, Workspace, WorkspaceId,
|
||||
item::{FollowableItem, Item, ItemEvent, ItemHandle},
|
||||
searchable::SearchableItemHandle,
|
||||
ItemNavHistory, Pane, SaveIntent, Toast, ViewId, Workspace, WorkspaceId,
|
||||
};
|
||||
use workspace::{item::Dedup, notifications::NotificationId};
|
||||
|
||||
actions!(collab, [CopyLink]);
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
use crate::{collab_panel, ChatPanelButton, ChatPanelSettings};
|
||||
use crate::{ChatPanelButton, ChatPanelSettings, collab_panel};
|
||||
use anyhow::Result;
|
||||
use call::{room, ActiveCall};
|
||||
use call::{ActiveCall, room};
|
||||
use channel::{ChannelChat, ChannelChatEvent, ChannelMessage, ChannelMessageId, ChannelStore};
|
||||
use client::{ChannelId, Client};
|
||||
use collections::HashMap;
|
||||
use db::kvp::KEY_VALUE_STORE;
|
||||
use editor::{actions, Editor};
|
||||
use editor::{Editor, actions};
|
||||
use gpui::{
|
||||
actions, div, list, prelude::*, px, Action, App, AsyncWindowContext, ClipboardItem, Context,
|
||||
CursorStyle, DismissEvent, ElementId, Entity, EventEmitter, FocusHandle, Focusable, FontWeight,
|
||||
HighlightStyle, ListOffset, ListScrollEvent, ListState, Render, Stateful, Subscription, Task,
|
||||
WeakEntity, Window,
|
||||
Action, App, AsyncWindowContext, ClipboardItem, Context, CursorStyle, DismissEvent, ElementId,
|
||||
Entity, EventEmitter, FocusHandle, Focusable, FontWeight, HighlightStyle, ListOffset,
|
||||
ListScrollEvent, ListState, Render, Stateful, Subscription, Task, WeakEntity, Window, actions,
|
||||
div, list, prelude::*, px,
|
||||
};
|
||||
use language::LanguageRegistry;
|
||||
use menu::Confirm;
|
||||
|
@ -22,13 +22,13 @@ use settings::Settings;
|
|||
use std::{sync::Arc, time::Duration};
|
||||
use time::{OffsetDateTime, UtcOffset};
|
||||
use ui::{
|
||||
prelude::*, Avatar, Button, ContextMenu, IconButton, IconName, KeyBinding, Label, PopoverMenu,
|
||||
Tab, TabBar, Tooltip,
|
||||
Avatar, Button, ContextMenu, IconButton, IconName, KeyBinding, Label, PopoverMenu, Tab, TabBar,
|
||||
Tooltip, prelude::*,
|
||||
};
|
||||
use util::{ResultExt, TryFutureExt};
|
||||
use workspace::{
|
||||
dock::{DockPosition, Panel, PanelEvent},
|
||||
Workspace,
|
||||
dock::{DockPosition, Panel, PanelEvent},
|
||||
};
|
||||
|
||||
mod message_editor;
|
||||
|
|
|
@ -9,10 +9,10 @@ use gpui::{
|
|||
HighlightStyle, IntoElement, Render, Task, TextStyle, WeakEntity, Window,
|
||||
};
|
||||
use language::{
|
||||
language_settings::SoftWrap, Anchor, Buffer, BufferSnapshot, CodeLabel, LanguageRegistry,
|
||||
ToOffset,
|
||||
Anchor, Buffer, BufferSnapshot, CodeLabel, LanguageRegistry, ToOffset,
|
||||
language_settings::SoftWrap,
|
||||
};
|
||||
use project::{search::SearchQuery, Completion, CompletionSource};
|
||||
use project::{Completion, CompletionSource, search::SearchQuery};
|
||||
use settings::Settings;
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
|
@ -22,7 +22,7 @@ use std::{
|
|||
time::Duration,
|
||||
};
|
||||
use theme::ThemeSettings;
|
||||
use ui::{prelude::*, TextSize};
|
||||
use ui::{TextSize, prelude::*};
|
||||
|
||||
use crate::panel_settings::MessageEditorSettings;
|
||||
|
||||
|
|
|
@ -2,26 +2,26 @@ mod channel_modal;
|
|||
mod contact_finder;
|
||||
|
||||
use self::channel_modal::ChannelModal;
|
||||
use crate::{channel_view::ChannelView, chat_panel::ChatPanel, CollaborationPanelSettings};
|
||||
use crate::{CollaborationPanelSettings, channel_view::ChannelView, chat_panel::ChatPanel};
|
||||
use call::ActiveCall;
|
||||
use channel::{Channel, ChannelEvent, ChannelStore};
|
||||
use client::{ChannelId, Client, Contact, User, UserStore};
|
||||
use contact_finder::ContactFinder;
|
||||
use db::kvp::KEY_VALUE_STORE;
|
||||
use editor::{Editor, EditorElement, EditorStyle};
|
||||
use fuzzy::{match_strings, StringMatchCandidate};
|
||||
use fuzzy::{StringMatchCandidate, match_strings};
|
||||
use gpui::{
|
||||
actions, anchored, canvas, deferred, div, fill, list, point, prelude::*, px, AnyElement, App,
|
||||
AsyncWindowContext, Bounds, ClickEvent, ClipboardItem, Context, DismissEvent, Div, Entity,
|
||||
EventEmitter, FocusHandle, Focusable, FontStyle, InteractiveElement, IntoElement, ListOffset,
|
||||
ListState, MouseDownEvent, ParentElement, Pixels, Point, PromptLevel, Render, SharedString,
|
||||
Styled, Subscription, Task, TextStyle, WeakEntity, Window,
|
||||
AnyElement, App, AsyncWindowContext, Bounds, ClickEvent, ClipboardItem, Context, DismissEvent,
|
||||
Div, Entity, EventEmitter, FocusHandle, Focusable, FontStyle, InteractiveElement, IntoElement,
|
||||
ListOffset, ListState, MouseDownEvent, ParentElement, Pixels, Point, PromptLevel, Render,
|
||||
SharedString, Styled, Subscription, Task, TextStyle, WeakEntity, Window, actions, anchored,
|
||||
canvas, deferred, div, fill, list, point, prelude::*, px,
|
||||
};
|
||||
use menu::{Cancel, Confirm, SecondaryConfirm, SelectNext, SelectPrevious};
|
||||
use project::{Fs, Project};
|
||||
use rpc::{
|
||||
proto::{self, ChannelVisibility, PeerId},
|
||||
ErrorCode, ErrorExt,
|
||||
proto::{self, ChannelVisibility, PeerId},
|
||||
};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use settings::Settings;
|
||||
|
@ -29,15 +29,15 @@ use smallvec::SmallVec;
|
|||
use std::{mem, sync::Arc};
|
||||
use theme::{ActiveTheme, ThemeSettings};
|
||||
use ui::{
|
||||
prelude::*, tooltip_container, Avatar, AvatarAvailabilityIndicator, Button, Color, ContextMenu,
|
||||
Facepile, Icon, IconButton, IconName, IconSize, Indicator, Label, ListHeader, ListItem,
|
||||
Tooltip,
|
||||
Avatar, AvatarAvailabilityIndicator, Button, Color, ContextMenu, Facepile, Icon, IconButton,
|
||||
IconName, IconSize, Indicator, Label, ListHeader, ListItem, Tooltip, prelude::*,
|
||||
tooltip_container,
|
||||
};
|
||||
use util::{maybe, ResultExt, TryFutureExt};
|
||||
use util::{ResultExt, TryFutureExt, maybe};
|
||||
use workspace::{
|
||||
OpenChannelNotes, Workspace,
|
||||
dock::{DockPosition, Panel, PanelEvent},
|
||||
notifications::{DetachAndPromptErr, NotifyResultExt, NotifyTaskExt},
|
||||
OpenChannelNotes, Workspace,
|
||||
};
|
||||
|
||||
actions!(
|
||||
|
@ -2519,12 +2519,14 @@ impl CollabPanel {
|
|||
]
|
||||
} else {
|
||||
let github_login = github_login.clone();
|
||||
vec![IconButton::new("remove_contact", IconName::Close)
|
||||
.on_click(cx.listener(move |this, _, window, cx| {
|
||||
this.remove_contact(user_id, &github_login, window, cx);
|
||||
}))
|
||||
.icon_color(color)
|
||||
.tooltip(Tooltip::text("Cancel invite"))]
|
||||
vec![
|
||||
IconButton::new("remove_contact", IconName::Close)
|
||||
.on_click(cx.listener(move |this, _, window, cx| {
|
||||
this.remove_contact(user_id, &github_login, window, cx);
|
||||
}))
|
||||
.icon_color(color)
|
||||
.tooltip(Tooltip::text("Cancel invite")),
|
||||
]
|
||||
};
|
||||
|
||||
ListItem::new(github_login.clone())
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
use channel::{ChannelMembership, ChannelStore};
|
||||
use client::{
|
||||
proto::{self, ChannelRole, ChannelVisibility},
|
||||
ChannelId, User, UserId, UserStore,
|
||||
proto::{self, ChannelRole, ChannelVisibility},
|
||||
};
|
||||
use fuzzy::{match_strings, StringMatchCandidate};
|
||||
use fuzzy::{StringMatchCandidate, match_strings};
|
||||
use gpui::{
|
||||
actions, anchored, deferred, div, App, ClipboardItem, Context, DismissEvent, Entity,
|
||||
EventEmitter, Focusable, ParentElement, Render, Styled, Subscription, Task, WeakEntity, Window,
|
||||
App, ClipboardItem, Context, DismissEvent, Entity, EventEmitter, Focusable, ParentElement,
|
||||
Render, Styled, Subscription, Task, WeakEntity, Window, actions, anchored, deferred, div,
|
||||
};
|
||||
use picker::{Picker, PickerDelegate};
|
||||
use std::sync::Arc;
|
||||
use ui::{prelude::*, Avatar, CheckboxWithLabel, ContextMenu, ListItem, ListItemSpacing};
|
||||
use ui::{Avatar, CheckboxWithLabel, ContextMenu, ListItem, ListItemSpacing, prelude::*};
|
||||
use util::TryFutureExt;
|
||||
use workspace::{notifications::DetachAndPromptErr, ModalView};
|
||||
use workspace::{ModalView, notifications::DetachAndPromptErr};
|
||||
|
||||
actions!(
|
||||
channel_modal,
|
||||
|
|
|
@ -5,7 +5,7 @@ use gpui::{
|
|||
};
|
||||
use picker::{Picker, PickerDelegate};
|
||||
use std::sync::Arc;
|
||||
use ui::{prelude::*, Avatar, ListItem, ListItemSpacing};
|
||||
use ui::{Avatar, ListItem, ListItemSpacing, prelude::*};
|
||||
use util::{ResultExt as _, TryFutureExt};
|
||||
use workspace::ModalView;
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ use std::{rc::Rc, sync::Arc};
|
|||
|
||||
pub use collab_panel::CollabPanel;
|
||||
use gpui::{
|
||||
point, App, Pixels, PlatformDisplay, Size, WindowBackgroundAppearance, WindowBounds,
|
||||
WindowDecorations, WindowKind, WindowOptions,
|
||||
App, Pixels, PlatformDisplay, Size, WindowBackgroundAppearance, WindowBounds,
|
||||
WindowDecorations, WindowKind, WindowOptions, point,
|
||||
};
|
||||
use panel_settings::MessageEditorSettings;
|
||||
pub use panel_settings::{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{chat_panel::ChatPanel, NotificationPanelSettings};
|
||||
use crate::{NotificationPanelSettings, chat_panel::ChatPanel};
|
||||
use anyhow::Result;
|
||||
use channel::ChannelStore;
|
||||
use client::{ChannelId, Client, Notification, User, UserStore};
|
||||
|
@ -6,10 +6,10 @@ use collections::HashMap;
|
|||
use db::kvp::KEY_VALUE_STORE;
|
||||
use futures::StreamExt;
|
||||
use gpui::{
|
||||
actions, div, img, list, px, AnyElement, App, AsyncWindowContext, Context, CursorStyle,
|
||||
DismissEvent, Element, Entity, EventEmitter, FocusHandle, Focusable, InteractiveElement,
|
||||
IntoElement, ListAlignment, ListScrollEvent, ListState, ParentElement, Render,
|
||||
StatefulInteractiveElement, Styled, Task, WeakEntity, Window,
|
||||
AnyElement, App, AsyncWindowContext, Context, CursorStyle, DismissEvent, Element, Entity,
|
||||
EventEmitter, FocusHandle, Focusable, InteractiveElement, IntoElement, ListAlignment,
|
||||
ListScrollEvent, ListState, ParentElement, Render, StatefulInteractiveElement, Styled, Task,
|
||||
WeakEntity, Window, actions, div, img, list, px,
|
||||
};
|
||||
use notifications::{NotificationEntry, NotificationEvent, NotificationStore};
|
||||
use project::Fs;
|
||||
|
@ -19,13 +19,13 @@ use settings::{Settings, SettingsStore};
|
|||
use std::{sync::Arc, time::Duration};
|
||||
use time::{OffsetDateTime, UtcOffset};
|
||||
use ui::{
|
||||
h_flex, prelude::*, v_flex, Avatar, Button, Icon, IconButton, IconName, Label, Tab, Tooltip,
|
||||
Avatar, Button, Icon, IconButton, IconName, Label, Tab, Tooltip, h_flex, prelude::*, v_flex,
|
||||
};
|
||||
use util::{ResultExt, TryFutureExt};
|
||||
use workspace::notifications::{Notification as WorkspaceNotification, NotificationId};
|
||||
use workspace::{
|
||||
dock::{DockPosition, Panel, PanelEvent},
|
||||
Workspace,
|
||||
dock::{DockPosition, Panel, PanelEvent},
|
||||
};
|
||||
|
||||
const LOADING_THRESHOLD: usize = 30;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use gpui::{img, prelude::*, AnyElement, SharedUri};
|
||||
use gpui::{AnyElement, SharedUri, img, prelude::*};
|
||||
use smallvec::SmallVec;
|
||||
use ui::prelude::*;
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ use crate::notification_window_options;
|
|||
use crate::notifications::collab_notification::CollabNotification;
|
||||
use call::{ActiveCall, IncomingCall};
|
||||
use futures::StreamExt;
|
||||
use gpui::{prelude::*, App, WindowHandle};
|
||||
use gpui::{App, WindowHandle, prelude::*};
|
||||
|
||||
use std::sync::{Arc, Weak};
|
||||
use ui::{prelude::*, Button, Label};
|
||||
use ui::{Button, Label, prelude::*};
|
||||
use util::ResultExt;
|
||||
use workspace::AppState;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use crate::notification_window_options;
|
||||
use crate::notifications::collab_notification::CollabNotification;
|
||||
use call::{room, ActiveCall};
|
||||
use call::{ActiveCall, room};
|
||||
use client::User;
|
||||
use collections::HashMap;
|
||||
use gpui::{App, Size};
|
||||
use std::sync::{Arc, Weak};
|
||||
|
||||
use ui::{prelude::*, Button, Label};
|
||||
use ui::{Button, Label, prelude::*};
|
||||
use util::ResultExt;
|
||||
use workspace::AppState;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue