Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Checkpoint

Antonio Scandurrafecb27232e58
diff --git a/crates/gpui3/src/elements/div.rs b/crates/gpui3/src/elements/div.rs
index 6919247c530..c95ca6e8536 100644
--- a/crates/gpui3/src/elements/div.rs
+++ b/crates/gpui3/src/elements/div.rs
@@ -81,7 +81,11 @@ where
}
}
-pub struct Div<V: 'static + Send + Sync, I: ElementIdentity, F: ElementFocusability> {
+pub struct Div<
+ V: 'static + Send + Sync,
+ I: ElementIdentity = Anonymous,
+ F: ElementFocusability = NonFocusable,
+> {
identity: I,
focusability: F,
children: SmallVec<[AnyElement<V>; 2]>,
diff --git a/crates/gpui3/src/elements/img.rs b/crates/gpui3/src/elements/img.rs
index a4c8f16b4b1..2cd411f0856 100644
--- a/crates/gpui3/src/elements/img.rs
+++ b/crates/gpui3/src/elements/img.rs
@@ -7,7 +7,11 @@ use crate::{
use futures::FutureExt;
use util::ResultExt;
-pub struct Img<V: 'static + Send + Sync, I: ElementIdentity, F: ElementFocusability> {
+pub struct Img<
+ V: 'static + Send + Sync,
+ I: ElementIdentity = Anonymous,
+ F: ElementFocusability = NonFocusable,
+> {
base: Div<V, I, F>,
uri: Option<SharedString>,
grayscale: bool,
diff --git a/crates/gpui3/src/elements/svg.rs b/crates/gpui3/src/elements/svg.rs
index c3f4972cb66..17be310457d 100644
--- a/crates/gpui3/src/elements/svg.rs
+++ b/crates/gpui3/src/elements/svg.rs
@@ -6,7 +6,11 @@ use crate::{
};
use util::ResultExt;
-pub struct Svg<V: 'static + Send + Sync, I: ElementIdentity, F: ElementFocusability> {
+pub struct Svg<
+ V: 'static + Send + Sync,
+ I: ElementIdentity = Anonymous,
+ F: ElementFocusability = NonFocusable,
+> {
base: Div<V, I, F>,
path: Option<SharedString>,
}