Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove some comments
Mikayla3a836b80263b
diff --git a/crates/collab_ui/src/collab_ui.rs b/crates/collab_ui/src/collab_ui.rsindex c8230620b4c..779fd121f8a 100644--- a/crates/collab_ui/src/collab_ui.rs+++ b/crates/collab_ui/src/collab_ui.rs@@ -41,10 +41,6 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {chat_panel::init(cx);notification_panel::init(cx);notifications::init(&app_state, cx);-- // cx.add_global_action(toggle_screen_sharing);- // cx.add_global_action(toggle_mute);- // cx.add_global_action(toggle_deafen);}pub fn toggle_screen_sharing(_: &ToggleScreenSharing, cx: &mut AppContext) {@@ -131,34 +127,6 @@ fn notification_window_options(}}-// fn render_avatar<T: 'static>(-// avatar: Option<Arc<ImageData>>,-// avatar_style: &AvatarStyle,-// container: ContainerStyle,-// ) -> AnyElement<T> {-// avatar-// .map(|avatar| {-// Image::from_data(avatar)-// .with_style(avatar_style.image)-// .aligned()-// .contained()-// .with_corner_radius(avatar_style.outer_corner_radius)-// .constrained()-// .with_width(avatar_style.outer_width)-// .with_height(avatar_style.outer_width)-// .into_any()-// })-// .unwrap_or_else(|| {-// Empty::new()-// .constrained()-// .with_width(avatar_style.outer_width)-// .into_any()-// })-// .contained()-// .with_style(container)-// .into_any()-// }-fn is_channels_feature_enabled(cx: &gpui::WindowContext<'_>) -> bool {cx.is_staff() || cx.has_flag::<ChannelsAlpha>()}diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 66d30b049cb..0bfd6afa3b2 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -1955,17 +1955,21 @@ impl Editor {}}- // pub fn language_at<'a, T: ToOffset>(- // &self,- // point: T,- // cx: &'a AppContext,- // ) -> Option<Arc<Language>> {- // self.buffer.read(cx).language_at(point, cx)- // }-- // pub fn file_at<'a, T: ToOffset>(&self, point: T, cx: &'a AppContext) -> Option<Arc<dyn File>> {- // self.buffer.read(cx).read(cx).file_at(point).cloned()- // }+ pub fn language_at<'a, T: ToOffset>(+ &self,+ point: T,+ cx: &'a AppContext,+ ) -> Option<Arc<Language>> {+ self.buffer.read(cx).language_at(point, cx)+ }++ pub fn file_at<'a, T: ToOffset>(+ &self,+ point: T,+ cx: &'a AppContext,+ ) -> Option<Arc<dyn language::File>> {+ self.buffer.read(cx).read(cx).file_at(point).cloned()+ }pub fn active_excerpt(&self,@@ -1976,15 +1980,6 @@ impl Editor {.excerpt_containing(self.selections.newest_anchor().head(), cx)}- // pub fn style(&self, cx: &AppContext) -> EditorStyle {- // build_style(- // settings::get::<ThemeSettings>(cx),- // self.get_field_editor_theme.as_deref(),- // self.override_text_style.as_deref(),- // cx,- // )- // }-pub fn mode(&self) -> EditorMode {self.mode}diff --git a/crates/gpui/src/color.rs b/crates/gpui/src/color.rsindex bc764e564c3..23fcc25f6ae 100644--- a/crates/gpui/src/color.rs+++ b/crates/gpui/src/color.rs@@ -355,16 +355,6 @@ impl Hsla {}}-// impl From<Hsla> for Rgba {-// fn from(value: Hsla) -> Self {-// let h = value.h;-// let s = value.s;-// let l = value.l;--// let c = (1 - |2L - 1|) X s-// }-// }-impl From<Rgba> for Hsla {fn from(color: Rgba) -> Self {let r = color.r;diff --git a/crates/gpui/src/taffy.rs b/crates/gpui/src/taffy.rsindex 0ebd394217a..cf8cb9ec327 100644--- a/crates/gpui/src/taffy.rs+++ b/crates/gpui/src/taffy.rs@@ -271,20 +271,6 @@ impl ToTaffy<taffy::style::Style> for Style {}}-// impl ToTaffy for Bounds<Length> {-// type Output = taffy::prelude::Bounds<taffy::prelude::LengthPercentageAuto>;--// fn to_taffy(-// &self,-// rem_size: Pixels,-// ) -> taffy::prelude::Bounds<taffy::prelude::LengthPercentageAuto> {-// taffy::prelude::Bounds {-// origin: self.origin.to_taffy(rem_size),-// size: self.size.to_taffy(rem_size),-// }-// }-// }-impl ToTaffy<taffy::style::LengthPercentageAuto> for Length {fn to_taffy(&self, rem_size: Pixels) -> taffy::prelude::LengthPercentageAuto {match self {diff --git a/crates/gpui/src/view.rs b/crates/gpui/src/view.rsindex 4472da02e71..247a5649967 100644--- a/crates/gpui/src/view.rs+++ b/crates/gpui/src/view.rs@@ -60,16 +60,6 @@ impl<V: 'static> View<V> {self.model.read(cx)}- // pub fn render_with<E>(&self, component: E) -> RenderViewWith<E, V>- // where- // E: 'static + Element,- // {- // RenderViewWith {- // view: self.clone(),- // element: Some(component),- // }- // }-pub fn focus_handle(&self, cx: &AppContext) -> FocusHandlewhereV: FocusableView,diff --git a/crates/gpui_macros/src/register_action.rs b/crates/gpui_macros/src/register_action.rsindex c18e4f4b89a..2772ec96348 100644--- a/crates/gpui_macros/src/register_action.rs+++ b/crates/gpui_macros/src/register_action.rs@@ -1,16 +1,3 @@-// Input:-//-// struct FooBar {}--// Output:-//-// struct FooBar {}-//-// #[allow(non_snake_case)]-// #[gpui2::ctor]-// fn register_foobar_builder() {-// gpui2::register_action_builder::<Foo>()-// }use proc_macro::TokenStream;use proc_macro2::Ident;use quote::{format_ident, quote};diff --git a/crates/refineable/derive_refineable/src/derive_refineable.rs b/crates/refineable/derive_refineable/src/derive_refineable.rsindex ad7678b58fe..99418206462 100644--- a/crates/refineable/derive_refineable/src/derive_refineable.rs+++ b/crates/refineable/derive_refineable/src/derive_refineable.rs@@ -69,13 +69,6 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {path: parse_quote!(Clone),}));- // punctuated.push_punct(syn::token::Add::default());- // punctuated.push_value(TypeParamBound::Trait(TraitBound {- // paren_token: None,- // modifier: syn::TraitBoundModifier::None,- // lifetimes: None,- // path: parse_quote!(Default),- // }));punctuated},})@@ -94,10 +87,6 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream {},};- // refinable_refine_assignments- // refinable_refined_assignments- // refinement_refine_assignments-let refineable_refine_assignments: Vec<TokenStream2> = fields.iter().map(|field| {