Fix some merge errors

This commit is contained in:
Marshall Bowers 2023-10-12 10:27:50 -04:00
parent 002458f4c8
commit 9581279919
2 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@ impl<V: 'static + Send + Sync> IntoAnyElement<V> for &'static str {
// TODO: Figure out how to pass `String` to `child` without this.
// This impl doesn't exist in the `gpui2` crate.
impl<S: 'static> IntoAnyElement<S> for String {
impl<S: 'static + Send + Sync> IntoAnyElement<S> for String {
fn into_any(self) -> AnyElement<S> {
Text {
text: ArcCow::from(self),

View file

@ -67,7 +67,7 @@ impl TaffyLayoutEngine {
.into()
}
fn count_all_children(&self, parent: LayoutId) -> Result<u32> {
fn count_all_children(&self, parent: LayoutId) -> anyhow::Result<u32> {
let mut count = 0;
for child in self.taffy.children(parent.0)? {
@ -81,7 +81,7 @@ impl TaffyLayoutEngine {
Ok(count)
}
fn max_depth(&self, depth: u32, parent: LayoutId) -> Result<u32> {
fn max_depth(&self, depth: u32, parent: LayoutId) -> anyhow::Result<u32> {
println!(
"{parent:?} at depth {depth} has {} children",
self.taffy.child_count(parent.0)?
@ -96,7 +96,7 @@ impl TaffyLayoutEngine {
Ok(depth + 1 + max_child_depth)
}
fn get_edges(&self, parent: LayoutId) -> Result<Vec<(LayoutId, LayoutId)>> {
fn get_edges(&self, parent: LayoutId) -> anyhow::Result<Vec<(LayoutId, LayoutId)>> {
let mut edges = Vec::new();
for child in self.taffy.children(parent.0)? {