Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
checkpoint
Mikaylafaf93aed4e8a
diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rsindex dbb510b1c8d..a81bcfcdbc0 100644--- a/crates/gpui2/src/action.rs+++ b/crates/gpui2/src/action.rs@@ -68,7 +68,7 @@ pub trait Action: std::fmt::Debug + 'static {// Types become actions by satisfying a list of trait bounds.impl<A> Action for Awhere- A: for<'a> Deserialize<'a> + PartialEq + Clone + Default + std::fmt::Debug + 'static,+ A: for<'a> Deserialize<'a> + PartialEq + Default + Clone + std::fmt::Debug + 'static,{fn qualified_name() -> SharedString {let name = type_name::<A>();diff --git a/crates/settings2/src/keymap_file.rs b/crates/settings2/src/keymap_file.rsindex 2b57af0fdb1..9f279864ee7 100644--- a/crates/settings2/src/keymap_file.rs+++ b/crates/settings2/src/keymap_file.rs@@ -9,7 +9,7 @@ use schemars::{};use serde::Deserialize;use serde_json::Value;-use util::asset_str;+use util::{asset_str, ResultExt};#[derive(Debug, Deserialize, Default, Clone, JsonSchema)]#[serde(transparent)]@@ -86,9 +86,7 @@ impl KeymapFile {"invalid binding value for keystroke {keystroke}, context {context:?}")})- // todo!()- .ok()- // .log_err()+ .log_err().map(|action| KeyBinding::load(&keystroke, action, context.as_deref()))}).collect::<Result<Vec<_>>>()?;diff --git a/crates/workspace2/src/pane.rs b/crates/workspace2/src/pane.rsindex 668ce2f2070..7f3658260c3 100644--- a/crates/workspace2/src/pane.rs+++ b/crates/workspace2/src/pane.rs@@ -1398,6 +1398,7 @@ impl Pane {.when_some(item.tab_tooltip_text(cx), |div, text| {div.tooltip(move |_, cx| cx.build_view(|cx| TextTooltip::new(text.clone())))})+ .on_click(move |v: &mut Self, e, cx| v.activate_item(ix, true, true, cx))// .on_drag(move |pane, cx| pane.render_tab(ix, item.boxed_clone(), detail, cx))// .drag_over::<DraggedTab>(|d| d.bg(cx.theme().colors().element_drop_target))// .on_drop(|_view, state: View<DraggedTab>, cx| {@@ -1430,32 +1431,22 @@ impl Pane {.items_center().gap_1().text_color(text_color)- .children(if item.has_conflict(cx) {- Some(- IconElement::new(Icon::ExclamationTriangle)- .size(ui::IconSize::Small)- .color(TextColor::Warning),- )- } else if item.is_dirty(cx) {- Some(- IconElement::new(Icon::ExclamationTriangle)- .size(ui::IconSize::Small)- .color(TextColor::Info),- )- } else {- None- })- .children(if !close_right {- Some(close_icon())- } else {- None- })+ .children(+ item.has_conflict(cx)+ .then(|| {+ IconElement::new(Icon::ExclamationTriangle)+ .size(ui::IconSize::Small)+ .color(TextColor::Warning)+ })+ .or(item.is_dirty(cx).then(|| {+ IconElement::new(Icon::ExclamationTriangle)+ .size(ui::IconSize::Small)+ .color(TextColor::Info)+ })),+ )+ .children((!close_right).then(|| close_icon())).child(label)- .children(if close_right {- Some(close_icon())- } else {- None- }),+ .children(close_right.then(|| close_icon())),)}diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rsindex 6c2d0c0ede0..6a26fbdb5ca 100644--- a/crates/workspace2/src/workspace2.rs+++ b/crates/workspace2/src/workspace2.rs@@ -36,11 +36,11 @@ use futures::{Future, FutureExt, StreamExt,};use gpui::{- actions, div, point, prelude::*, rems, size, Action, AnyModel, AnyView, AnyWeakView,- AppContext, AsyncAppContext, AsyncWindowContext, Bounds, Component, Div, Entity, EntityId,- EventEmitter, GlobalPixels, KeyContext, Model, ModelContext, ParentComponent, Point, Render,- Size, Styled, Subscription, Task, View, ViewContext, WeakView, WindowBounds, WindowContext,- WindowHandle, WindowOptions,+ actions, div, point, prelude::*, register_action, rems, size, Action, AnyModel, AnyView,+ AnyWeakView, AppContext, AsyncAppContext, AsyncWindowContext, Bounds, Component, Div, Entity,+ EntityId, EventEmitter, GlobalPixels, KeyContext, Model, ModelContext, ParentComponent, Point,+ Render, Size, Styled, Subscription, Task, View, ViewContext, WeakView, WindowBounds,+ WindowContext, WindowHandle, WindowOptions,};use item::{FollowableItem, FollowableItemHandle, Item, ItemHandle, ItemSettings, ProjectItem};use itertools::Itertools;