mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
Fix warnings for a clean build
This commit is contained in:
parent
3b5ee59273
commit
6275c560e7
3 changed files with 15 additions and 16 deletions
|
@ -38,7 +38,7 @@ impl<V: 'static> gpui::Element<V> for AdapterElement<V> {
|
||||||
&mut self,
|
&mut self,
|
||||||
scene: &mut gpui::SceneBuilder,
|
scene: &mut gpui::SceneBuilder,
|
||||||
bounds: RectF,
|
bounds: RectF,
|
||||||
visible_bounds: RectF,
|
_visible_bounds: RectF,
|
||||||
layout_data: &mut Option<(LayoutEngine, LayoutId)>,
|
layout_data: &mut Option<(LayoutEngine, LayoutId)>,
|
||||||
view: &mut V,
|
view: &mut V,
|
||||||
legacy_cx: &mut gpui::PaintContext<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(
|
fn rect_for_text_range(
|
||||||
&self,
|
&self,
|
||||||
range_utf16: std::ops::Range<usize>,
|
_range_utf16: std::ops::Range<usize>,
|
||||||
bounds: RectF,
|
_bounds: RectF,
|
||||||
visible_bounds: RectF,
|
_visible_bounds: RectF,
|
||||||
layout: &Self::LayoutState,
|
_layout: &Self::LayoutState,
|
||||||
paint: &Self::PaintState,
|
_paint: &Self::PaintState,
|
||||||
view: &V,
|
_view: &V,
|
||||||
cx: &gpui::ViewContext<V>,
|
_cx: &gpui::ViewContext<V>,
|
||||||
) -> Option<RectF> {
|
) -> Option<RectF> {
|
||||||
todo!("implement before merging to main")
|
todo!("implement before merging to main")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn debug(
|
fn debug(
|
||||||
&self,
|
&self,
|
||||||
bounds: RectF,
|
_bounds: RectF,
|
||||||
layout: &Self::LayoutState,
|
_layout: &Self::LayoutState,
|
||||||
paint: &Self::PaintState,
|
_paint: &Self::PaintState,
|
||||||
view: &V,
|
_view: &V,
|
||||||
cx: &gpui::ViewContext<V>,
|
_cx: &gpui::ViewContext<V>,
|
||||||
) -> gpui::serde_json::Value {
|
) -> gpui::serde_json::Value {
|
||||||
todo!("implement before merging to main")
|
todo!("implement before merging to main")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
use std::marker::PhantomData;
|
|
||||||
|
|
||||||
pub use crate::layout_context::LayoutContext;
|
pub use crate::layout_context::LayoutContext;
|
||||||
pub use crate::paint_context::PaintContext;
|
pub use crate::paint_context::PaintContext;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
@ -56,6 +54,7 @@ enum ElementPhase<V: 'static, E: Element<V>> {
|
||||||
layout_id: LayoutId,
|
layout_id: LayoutId,
|
||||||
paint_state: E::PaintState,
|
paint_state: E::PaintState,
|
||||||
},
|
},
|
||||||
|
#[allow(dead_code)]
|
||||||
PostPaint {
|
PostPaint {
|
||||||
layout: Layout,
|
layout: Layout,
|
||||||
paint_state: E::PaintState,
|
paint_state: E::PaintState,
|
||||||
|
|
|
@ -36,7 +36,7 @@ impl<V: 'static> Element<V> for Text {
|
||||||
|
|
||||||
let layout_id = cx.add_measured_layout_node(Default::default(), {
|
let layout_id = cx.add_measured_layout_node(Default::default(), {
|
||||||
let paint_state = paint_state.clone();
|
let paint_state = paint_state.clone();
|
||||||
move |params| {
|
move |_params| {
|
||||||
let line_layout = fonts.layout_line(
|
let line_layout = fonts.layout_line(
|
||||||
text.as_ref(),
|
text.as_ref(),
|
||||||
text_style.font_size,
|
text_style.font_size,
|
||||||
|
|
Loading…
Reference in a new issue