From 331fd896b56e90f27c7c3296633303b0ba3685fa Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Thu, 13 Jul 2023 14:21:30 -0700 Subject: [PATCH] fmt --- crates/workspace/src/pane_group.rs | 12 +++++++----- crates/workspace/src/persistence/model.rs | 6 +++++- crates/workspace/src/workspace.rs | 3 ++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs index e58b95d6b387a56191c8d0fa818043b364963fe2..1edee1bc427fcc64384c809816e8f50e5910ca61 100644 --- a/crates/workspace/src/pane_group.rs +++ b/crates/workspace/src/pane_group.rs @@ -536,7 +536,7 @@ mod element { use crate::{ pane_group::{HANDLE_HITBOX_SIZE, HORIZONTAL_MIN_SIZE, VERTICAL_MIN_SIZE}, - WorkspaceSettings, Workspace, + Workspace, WorkspaceSettings, }; pub struct PaneAxisElement { @@ -547,7 +547,7 @@ mod element { children: Vec>, } - impl PaneAxisElement { + impl PaneAxisElement { pub fn new(axis: Axis, basis: usize, flexes: Rc>>) -> Self { Self { axis, @@ -761,8 +761,9 @@ mod element { self.basis + ix, handle_bounds, ); - mouse_region = - mouse_region.on_drag(MouseButton::Left, move |drag, workspace: &mut Workspace, cx| { + mouse_region = mouse_region.on_drag( + MouseButton::Left, + move |drag, workspace: &mut Workspace, cx| { let min_size = match axis { Axis::Horizontal => HORIZONTAL_MIN_SIZE, Axis::Vertical => VERTICAL_MIN_SIZE, @@ -805,7 +806,8 @@ mod element { workspace.schedule_serialize(cx); cx.notify(); - }); + }, + ); scene.push_mouse_region(mouse_region); scene.pop_stacking_context(); diff --git a/crates/workspace/src/persistence/model.rs b/crates/workspace/src/persistence/model.rs index aa184dbb56a670a8124480e35d76f133d96dd2f8..5f4c29cd5b607669ec851059e74b09208395a47d 100644 --- a/crates/workspace/src/persistence/model.rs +++ b/crates/workspace/src/persistence/model.rs @@ -161,7 +161,11 @@ impl SerializedPaneGroup { Vec>>, )> { match self { - SerializedPaneGroup::Group { axis, children, flexes } => { + SerializedPaneGroup::Group { + axis, + children, + flexes, + } => { let mut current_active_pane = None; let mut members = Vec::new(); let mut items = Vec::new(); diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index e31e0d924f5d0d92eb0f6d1f9712364142fc9f12..885c686ddc62eb921bad354aa9bd825402db5e65 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -2898,7 +2898,8 @@ impl Workspace { fn schedule_serialize(&mut self, cx: &mut ViewContext) { self._schedule_serialize = Some(cx.spawn(|this, cx| async move { cx.background().timer(Duration::from_millis(100)).await; - this.read_with(&cx, |this, cx| this.serialize_workspace(cx)).ok(); + this.read_with(&cx, |this, cx| this.serialize_workspace(cx)) + .ok(); })); }