Remove some comments

This commit is contained in:
Mikayla 2024-01-11 10:28:22 -08:00
parent d2c436dcdc
commit 3a836b8026
No known key found for this signature in database
7 changed files with 14 additions and 109 deletions

View File

@ -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>()
}

View File

@ -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 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 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
}

View File

@ -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;

View File

@ -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 {

View File

@ -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) -> FocusHandle
where
V: FocusableView,

View File

@ -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};

View File

@ -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| {