Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove stray todo
Antonio Scandurrad5f0e91faa28
diff --git a/crates/gpui2/src/app/async_context.rs b/crates/gpui2/src/app/async_context.rsindex 01af7ae1943..f08c7ed0a96 100644--- a/crates/gpui2/src/app/async_context.rs+++ b/crates/gpui2/src/app/async_context.rs@@ -184,13 +184,12 @@ impl AsyncWindowContext {self.window.update(self, |_, cx| cx.update_global(update))}- pub fn spawn<Fut, R>(&self, f: impl FnOnce(AsyncWindowContext) -> Fut + 'static) -> Task<R>+ pub fn spawn<Fut, R>(&self, f: impl FnOnce(AsyncWindowContext) -> Fut) -> Task<R>whereFut: Future<Output = R> + 'static,R: 'static,{- let this = self.clone();- self.foreground_executor.spawn(async move { f(this).await })+ self.foreground_executor.spawn(f(self.clone()))}}diff --git a/crates/gpui2/src/platform.rs b/crates/gpui2/src/platform.rsindex 2dd4d8b666a..9a6768342f7 100644--- a/crates/gpui2/src/platform.rs+++ b/crates/gpui2/src/platform.rs@@ -5,9 +5,10 @@ mod mac;mod test;use crate::{- AnyWindowHandle, BackgroundExecutor, Bounds, DevicePixels, Font, FontId, FontMetrics, FontRun,- ForegroundExecutor, GlobalPixels, GlyphId, InputEvent, LineLayout, Pixels, Point,- RenderGlyphParams, RenderImageParams, RenderSvgParams, Result, Scene, SharedString, Size,+ point, size, AnyWindowHandle, BackgroundExecutor, Bounds, DevicePixels, Font, FontId,+ FontMetrics, FontRun, ForegroundExecutor, GlobalPixels, GlyphId, InputEvent, LineLayout,+ Pixels, Point, RenderGlyphParams, RenderImageParams, RenderSvgParams, Result, Scene,+ SharedString, Size,};use anyhow::{anyhow, bail};use async_task::Runnable;@@ -422,12 +423,15 @@ impl Column for WindowBounds {"Fullscreen" => WindowBounds::Fullscreen,"Maximized" => WindowBounds::Maximized,"Fixed" => {- // let ((x, y, width, height), _) = Column::column(statement, next_index)?;- // WindowBounds::Fixed(RectF::new(- // Vector2F::new(x, y),- // Vector2F::new(width, height),- // ))- todo!()+ let ((x, y, width, height), _) = Column::column(statement, next_index)?;+ let x: f64 = x;+ let y: f64 = y;+ let width: f64 = width;+ let height: f64 = height;+ WindowBounds::Fixed(Bounds {+ origin: point(x.into(), y.into()),+ size: size(width.into(), height.into()),+ })}_ => bail!("Window State did not have a valid string"),};