From f8857fe1c80e67c51a23fc27610e98c0523f911b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Wed, 14 Oct 2026 11:20:46 -0400 Subject: [PATCH] T01: rustfmt --- src/main.rs | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/main.rs b/src/main.rs index 145a360..fb427d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,29 +35,27 @@ fn application() -> gpui::Application { fn main() { env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("elyterminal=info")) .init(); - application() - .with_assets(Assets) - .run(|cx: &mut App| { - ely_gpui_component::init(cx).expect("Ely failed to start"); - Theme::set_mode_now(Mode::Dark, cx); - let bounds = Bounds::centered(None, size(px(1200.0), px(760.0)), cx); - let options = WindowOptions { - window_bounds: Some(WindowBounds::Windowed(bounds)), - titlebar: Some(TitlebarOptions { - title: Some("ELYTerminal".into()), - ..Default::default() - }), + application().with_assets(Assets).run(|cx: &mut App| { + ely_gpui_component::init(cx).expect("Ely failed to start"); + Theme::set_mode_now(Mode::Dark, cx); + let bounds = Bounds::centered(None, size(px(1200.0), px(760.0)), cx); + let options = WindowOptions { + window_bounds: Some(WindowBounds::Windowed(bounds)), + titlebar: Some(TitlebarOptions { + title: Some("ELYTerminal".into()), ..Default::default() - }; - cx.open_window(options, |window, cx| { - cx.new(|cx| { - let focus = cx.focus_handle(); - window.focus(&focus, cx); - Workspace { focus } - }) + }), + ..Default::default() + }; + cx.open_window(options, |window, cx| { + cx.new(|cx| { + let focus = cx.focus_handle(); + window.focus(&focus, cx); + Workspace { focus } }) - .expect("the main window failed to open"); - log::info!("app: main window open"); - cx.activate(true); - }); + }) + .expect("the main window failed to open"); + log::info!("app: main window open"); + cx.activate(true); + }); }