Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix semantic merge conflict from RelPath refactor (#38829)
Cole Millerd321cf93ba07
diff --git a/Cargo.lock b/Cargo.lockindex 609edba3ec5..a2ab191e591 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -14524,6 +14524,7 @@ dependencies = ["settings","theme","ui",+ "util","workspace","workspace-hack","zlog",diff --git a/crates/settings/src/settings_store.rs b/crates/settings/src/settings_store.rsindex 0f7f466b08c..27ca294adde 100644--- a/crates/settings/src/settings_store.rs+++ b/crates/settings/src/settings_store.rs@@ -164,7 +164,7 @@ pub enum SettingsFile {Extension,Server,Default,- Local((WorktreeId, Arc<Path>)),+ Local((WorktreeId, Arc<RelPath>)),}#[derive(Clone)]diff --git a/crates/settings_ui/Cargo.toml b/crates/settings_ui/Cargo.tomlindex 00e79567ba8..53300f71e49 100644--- a/crates/settings_ui/Cargo.toml+++ b/crates/settings_ui/Cargo.toml@@ -28,6 +28,7 @@ serde.workspace = truesettings.workspace = truetheme.workspace = trueui.workspace = true+util.workspace = trueworkspace-hack.workspace = trueworkspace.workspace = truediff --git a/crates/settings_ui/src/settings_ui.rs b/crates/settings_ui/src/settings_ui.rsindex d13dd5cd503..680d46bdcfe 100644--- a/crates/settings_ui/src/settings_ui.rs+++ b/crates/settings_ui/src/settings_ui.rs@@ -9,13 +9,13 @@ use gpui::{};use project::WorktreeId;use settings::{SettingsContent, SettingsStore};-use std::path::Path;use ui::{ActiveTheme as _, AnyElement, BorrowAppContext as _, Button, Clickable as _, Color,FluentBuilder as _, Icon, IconName, InteractiveElement as _, Label, LabelCommon as _,LabelSize, ParentElement, SharedString, StatefulInteractiveElement as _, Styled, Switch,v_flex,};+use util::{paths::PathStyle, rel_path::RelPath};fn user_settings_data() -> Vec<SettingsPage> {vec![@@ -84,7 +84,7 @@ fn project_settings_data() -> Vec<SettingsPage> {"project_name",SettingsFile::Local((WorktreeId::from_usize(0),- Arc::from(Path::new("TODO: actually pass through file")),+ Arc::from(RelPath::new("TODO: actually pass through file").unwrap()),)),window,cx,@@ -202,9 +202,9 @@ struct SettingItem {#[allow(unused)]#[derive(Clone, PartialEq)]enum SettingsFile {- User, // Uses all settings.- Local((WorktreeId, Arc<Path>)), // Has a special name, and special set of settings- Server(&'static str), // Uses a special name, and the user settings+ User, // Uses all settings.+ Local((WorktreeId, Arc<RelPath>)), // Has a special name, and special set of settings+ Server(&'static str), // Uses a special name, and the user settings}impl SettingsFile {@@ -219,7 +219,10 @@ impl SettingsFile {fn name(&self) -> SharedString {match self {SettingsFile::User => SharedString::new_static("User"),- SettingsFile::Local((_, path)) => format!("Local ({})", path.display()).into(),+ // TODO is PathStyle::local() ever not appropriate?+ SettingsFile::Local((_, path)) => {+ format!("Local ({})", path.display(PathStyle::local())).into()+ }SettingsFile::Server(file) => format!("Server ({})", file).into(),}}