From 4ab48c689f954863c6eef17725e533bf10c6c251 Mon Sep 17 00:00:00 2001 From: Michael Angerman <1809991+stormasm@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:41:45 -0700 Subject: [PATCH] storybook: Fix crash in Picker story (#10793) @mikayla-maki approved my suggested change as noted in the issue below... Release Notes: - Fixed: [#10739 ](https://github.com/zed-industries/zed/issues/10739) --- Cargo.lock | 1 + crates/storybook/Cargo.toml | 1 + crates/storybook/src/stories/picker.rs | 2 ++ 3 files changed, 4 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 57466fb0f7..3b243f7d59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9418,6 +9418,7 @@ dependencies = [ "log", "menu", "picker", + "project", "rust-embed", "settings", "simplelog", diff --git a/crates/storybook/Cargo.toml b/crates/storybook/Cargo.toml index 5beea54061..5b19171349 100644 --- a/crates/storybook/Cargo.toml +++ b/crates/storybook/Cargo.toml @@ -26,6 +26,7 @@ language.workspace = true log.workspace = true menu.workspace = true picker.workspace = true +project.workspace = true rust-embed.workspace = true settings.workspace = true simplelog = "0.9" diff --git a/crates/storybook/src/stories/picker.rs b/crates/storybook/src/stories/picker.rs index ca156ba730..1aceeea9b2 100644 --- a/crates/storybook/src/stories/picker.rs +++ b/crates/storybook/src/stories/picker.rs @@ -1,6 +1,7 @@ use fuzzy::StringMatchCandidate; use gpui::{div, prelude::*, KeyBinding, Render, SharedString, Styled, Task, View, WindowContext}; use picker::{Picker, PickerDelegate}; +use project::Project; use std::sync::Arc; use ui::{prelude::*, ListItemSpacing}; use ui::{Label, ListItem}; @@ -190,6 +191,7 @@ impl PickerStory { ]); delegate.update_matches("".into(), cx).detach(); + Project::init_settings(cx); let picker = Picker::uniform_list(delegate, cx); picker.focus(cx); picker