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:
@@ -1,6 +1,6 @@
|
||||
use crate::{attach_modal::Candidate, *};
|
||||
use attach_modal::AttachModal;
|
||||
use dap::{client::SessionId, FakeAdapter};
|
||||
use dap::{FakeAdapter, client::SessionId};
|
||||
use gpui::{BackgroundExecutor, TestAppContext, VisualTestContext};
|
||||
use menu::Confirm;
|
||||
use project::{FakeFs, Project};
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
use crate::*;
|
||||
use dap::{
|
||||
ErrorResponse, RunInTerminalRequestArguments, SourceBreakpoint, StartDebuggingRequestArguments,
|
||||
StartDebuggingRequestArgumentsRequest,
|
||||
client::SessionId,
|
||||
requests::{
|
||||
Continue, Disconnect, Launch, Next, RunInTerminal, SetBreakpoints, StackTrace,
|
||||
StartDebugging, StepBack, StepIn, StepOut, Threads,
|
||||
},
|
||||
ErrorResponse, RunInTerminalRequestArguments, SourceBreakpoint, StartDebuggingRequestArguments,
|
||||
StartDebuggingRequestArgumentsRequest,
|
||||
};
|
||||
use editor::{
|
||||
actions::{self},
|
||||
Editor, EditorMode, MultiBuffer,
|
||||
actions::{self},
|
||||
};
|
||||
use gpui::{BackgroundExecutor, TestAppContext, VisualTestContext};
|
||||
use project::{
|
||||
debugger::session::{ThreadId, ThreadStatus},
|
||||
FakeFs, Project,
|
||||
debugger::session::{ThreadId, ThreadStatus},
|
||||
};
|
||||
use serde_json::json;
|
||||
use std::{
|
||||
path::Path,
|
||||
sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
},
|
||||
};
|
||||
use task::LaunchConfig;
|
||||
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
|
||||
use terminal_view::{TerminalView, terminal_panel::TerminalPanel};
|
||||
use tests::{active_debug_session_panel, init_test, init_test_workspace};
|
||||
use util::path;
|
||||
use workspace::{dock::Panel, Item};
|
||||
use workspace::{Item, dock::Panel};
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_basic_show_debug_panel(executor: BackgroundExecutor, cx: &mut TestAppContext) {
|
||||
@@ -444,15 +444,17 @@ async fn test_handle_successful_run_in_terminal_reverse_request(
|
||||
let panel = terminal_panel.read(cx).pane().unwrap().read(cx);
|
||||
|
||||
assert_eq!(1, panel.items_len());
|
||||
assert!(panel
|
||||
.active_item()
|
||||
.unwrap()
|
||||
.downcast::<TerminalView>()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.terminal()
|
||||
.read(cx)
|
||||
.debug_terminal());
|
||||
assert!(
|
||||
panel
|
||||
.active_item()
|
||||
.unwrap()
|
||||
.downcast::<TerminalView>()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.terminal()
|
||||
.read(cx)
|
||||
.debug_terminal()
|
||||
);
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
@@ -772,15 +774,21 @@ async fn test_shutdown_children_when_parent_session_shutdown(
|
||||
|
||||
// assert parent session and all children sessions are shutdown
|
||||
dap_store.update(cx, |dap_store, cx| {
|
||||
assert!(dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(dap_store
|
||||
.session_by_id(first_child_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(first_child_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -874,15 +882,21 @@ async fn test_shutdown_parent_session_if_all_children_are_shutdown(
|
||||
|
||||
// assert parent session and second child session still exist
|
||||
dap_store.update(cx, |dap_store, cx| {
|
||||
assert!(dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_some());
|
||||
assert!(dap_store
|
||||
.session_by_id(first_child_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_some());
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_some()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(first_child_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_some()
|
||||
);
|
||||
});
|
||||
|
||||
// shutdown first child session
|
||||
@@ -896,12 +910,16 @@ async fn test_shutdown_parent_session_if_all_children_are_shutdown(
|
||||
// assert parent session got shutdown by second child session
|
||||
// because it was the last child
|
||||
dap_store.update(cx, |dap_store, cx| {
|
||||
assert!(dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_none());
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(parent_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
dap_store
|
||||
.session_by_id(second_child_session.read(cx).session_id())
|
||||
.is_none()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ use crate::{
|
||||
tests::{active_debug_session_panel, init_test, init_test_workspace},
|
||||
};
|
||||
use dap::{
|
||||
requests::{Modules, StackTrace, Threads},
|
||||
StoppedEvent,
|
||||
requests::{Modules, StackTrace, Threads},
|
||||
};
|
||||
use gpui::{BackgroundExecutor, TestAppContext, VisualTestContext};
|
||||
use project::{FakeFs, Project};
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, AtomicI32, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicBool, AtomicI32, Ordering},
|
||||
};
|
||||
use task::LaunchConfig;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ use crate::{
|
||||
tests::{active_debug_session_panel, init_test, init_test_workspace},
|
||||
};
|
||||
use dap::{
|
||||
requests::{StackTrace, Threads},
|
||||
StackFrame,
|
||||
requests::{StackTrace, Threads},
|
||||
};
|
||||
use editor::{Editor, ToPoint as _};
|
||||
use gpui::{BackgroundExecutor, TestAppContext, VisualTestContext};
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
DebugPanel,
|
||||
session::running::variable_list::{CollapseSelectedEntry, ExpandSelectedEntry},
|
||||
tests::{active_debug_session_panel, init_test, init_test_workspace},
|
||||
DebugPanel,
|
||||
};
|
||||
use collections::HashMap;
|
||||
use dap::{
|
||||
requests::{Initialize, Launch, Scopes, StackTrace, Variables},
|
||||
Scope, StackFrame, Variable,
|
||||
requests::{Initialize, Launch, Scopes, StackTrace, Variables},
|
||||
};
|
||||
use gpui::{BackgroundExecutor, TestAppContext, VisualTestContext};
|
||||
use menu::{SelectFirst, SelectNext, SelectPrevious};
|
||||
|
||||
Reference in New Issue
Block a user