Fix warnings for a clean build

This commit is contained in:
Nathan Sobo 2023-09-01 10:08:41 -06:00
parent 3b5ee59273
commit 6275c560e7
3 changed files with 15 additions and 16 deletions

View file

@ -38,7 +38,7 @@ impl<V: 'static> gpui::Element<V> for AdapterElement<V> {
&mut self,
scene: &mut gpui::SceneBuilder,
bounds: RectF,
visible_bounds: RectF,
_visible_bounds: RectF,
layout_data: &mut Option<(LayoutEngine, LayoutId)>,
view: &mut V,
legacy_cx: &mut gpui::PaintContext<V>,
@ -53,24 +53,24 @@ impl<V: 'static> gpui::Element<V> for AdapterElement<V> {
fn rect_for_text_range(
&self,
range_utf16: std::ops::Range<usize>,
bounds: RectF,
visible_bounds: RectF,
layout: &Self::LayoutState,
paint: &Self::PaintState,
view: &V,
cx: &gpui::ViewContext<V>,
_range_utf16: std::ops::Range<usize>,
_bounds: RectF,
_visible_bounds: RectF,
_layout: &Self::LayoutState,
_paint: &Self::PaintState,
_view: &V,
_cx: &gpui::ViewContext<V>,
) -> Option<RectF> {
todo!("implement before merging to main")
}
fn debug(
&self,
bounds: RectF,
layout: &Self::LayoutState,
paint: &Self::PaintState,
view: &V,
cx: &gpui::ViewContext<V>,
_bounds: RectF,
_layout: &Self::LayoutState,
_paint: &Self::PaintState,
_view: &V,
_cx: &gpui::ViewContext<V>,
) -> gpui::serde_json::Value {
todo!("implement before merging to main")
}

View file

@ -1,5 +1,3 @@
use std::marker::PhantomData;
pub use crate::layout_context::LayoutContext;
pub use crate::paint_context::PaintContext;
use anyhow::Result;
@ -56,6 +54,7 @@ enum ElementPhase<V: 'static, E: Element<V>> {
layout_id: LayoutId,
paint_state: E::PaintState,
},
#[allow(dead_code)]
PostPaint {
layout: Layout,
paint_state: E::PaintState,

View file

@ -36,7 +36,7 @@ impl<V: 'static> Element<V> for Text {
let layout_id = cx.add_measured_layout_node(Default::default(), {
let paint_state = paint_state.clone();
move |params| {
move |_params| {
let line_layout = fonts.layout_line(
text.as_ref(),
text_style.font_size,