Format code with rustfmt

This commit is contained in:
Eduardo Alba 2025-08-06 02:01:32 -04:00
parent 903935fd88
commit 4d46f74470

View file

@ -9,7 +9,9 @@ use gpui::{
use picker::{Picker, PickerDelegate}; use picker::{Picker, PickerDelegate};
use settings::{Settings as _, SettingsStore, update_settings_file}; use settings::{Settings as _, SettingsStore, update_settings_file};
use std::sync::Arc; use std::sync::Arc;
use theme::{Appearance, Theme, ThemeMeta, ThemeMode, ThemeRegistry, ThemeSelection, ThemeSettings}; use theme::{
Appearance, Theme, ThemeMeta, ThemeMode, ThemeRegistry, ThemeSelection, ThemeSettings,
};
use ui::{ListItem, ListItemSpacing, prelude::*, v_flex}; use ui::{ListItem, ListItemSpacing, prelude::*, v_flex};
use util::ResultExt; use util::ResultExt;
use workspace::{ModalView, Workspace, ui::HighlightedLabel, with_active_or_new_workspace}; use workspace::{ModalView, Workspace, ui::HighlightedLabel, with_active_or_new_workspace};
@ -81,24 +83,18 @@ fn toggle_icon_theme_selector(
}); });
} }
fn toggle_theme_mode( fn toggle_theme_mode(workspace: &mut Workspace, _window: &mut Window, cx: &mut Context<Workspace>) {
workspace: &mut Workspace,
_window: &mut Window,
cx: &mut Context<Workspace>,
) {
let current_settings = ThemeSettings::get_global(cx); let current_settings = ThemeSettings::get_global(cx);
let current_selection = current_settings.theme_selection.as_ref(); let current_selection = current_settings.theme_selection.as_ref();
let new_mode = match current_selection { let new_mode = match current_selection {
Some(ThemeSelection::Dynamic { mode, .. }) => { Some(ThemeSelection::Dynamic { mode, .. }) => match mode {
match mode { ThemeMode::Light => ThemeMode::Dark,
ThemeMode::Light => ThemeMode::Dark, ThemeMode::Dark => ThemeMode::System,
ThemeMode::Dark => ThemeMode::System, ThemeMode::System => ThemeMode::Light,
ThemeMode::System => ThemeMode::Light, },
}
}
Some(ThemeSelection::Static(_)) => ThemeMode::Light, Some(ThemeSelection::Static(_)) => ThemeMode::Light,
None => ThemeMode::Light None => ThemeMode::Light,
}; };
let fs = workspace.app_state().fs.clone(); let fs = workspace.app_state().fs.clone();