Fix formatting in various files (#42917)

This fixes various issues where rustfmt failed to format code due to too
long strings, most of which I stumbled across over the last week and
some additonal ones I searched for whilst fixing the others.

Release Notes:

- N/A
This commit is contained in:
Finn Evers
2025-11-17 21:48:09 +00:00
committed by GitHub
parent ee420d530e
commit d9cfc2c883
8 changed files with 295 additions and 202 deletions
+26 -24
View File
@@ -7306,14 +7306,9 @@ pub fn join_channel(
) -> Task<Result<()>> {
let active_call = ActiveCall::global(cx);
cx.spawn(async move |cx| {
let result = join_channel_internal(
channel_id,
&app_state,
requesting_window,
&active_call,
cx,
)
.await;
let result =
join_channel_internal(channel_id, &app_state, requesting_window, &active_call, cx)
.await;
// join channel succeeded, and opened a window
if matches!(result, Ok(true)) {
@@ -7321,8 +7316,7 @@ pub fn join_channel(
}
// find an existing workspace to focus and show call controls
let mut active_window =
requesting_window.or_else(|| activate_any_workspace_window( cx));
let mut active_window = requesting_window.or_else(|| activate_any_workspace_window(cx));
if active_window.is_none() {
// no open workspaces, make one to show the error in (blergh)
let (window_handle, _) = cx
@@ -7334,7 +7328,8 @@ pub fn join_channel(
if result.is_ok() {
cx.update(|cx| {
cx.dispatch_action(&OpenChannelNotes);
}).log_err();
})
.log_err();
}
active_window = Some(window_handle);
@@ -7346,19 +7341,25 @@ pub fn join_channel(
active_window
.update(cx, |_, window, cx| {
let detail: SharedString = match err.error_code() {
ErrorCode::SignedOut => {
"Please sign in to continue.".into()
ErrorCode::SignedOut => "Please sign in to continue.".into(),
ErrorCode::UpgradeRequired => concat!(
"Your are running an unsupported version of Zed. ",
"Please update to continue."
)
.into(),
ErrorCode::NoSuchChannel => concat!(
"No matching channel was found. ",
"Please check the link and try again."
)
.into(),
ErrorCode::Forbidden => concat!(
"This channel is private, and you do not have access. ",
"Please ask someone to add you and try again."
)
.into(),
ErrorCode::Disconnected => {
"Please check your internet connection and try again.".into()
}
ErrorCode::UpgradeRequired => {
"Your are running an unsupported version of Zed. Please update to continue.".into()
}
ErrorCode::NoSuchChannel => {
"No matching channel was found. Please check the link and try again.".into()
}
ErrorCode::Forbidden => {
"This channel is private, and you do not have access. Please ask someone to add you and try again.".into()
}
ErrorCode::Disconnected => "Please check your internet connection and try again.".into(),
_ => format!("{}\n\nPlease try again.", err).into(),
};
window.prompt(
@@ -7366,7 +7367,8 @@ pub fn join_channel(
"Failed to join channel",
Some(&detail),
&["Ok"],
cx)
cx,
)
})?
.await
.ok();