From 0269a8699b91eb75d5661ac0898fbade3644a066 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 13 Apr 2023 12:04:37 +0200 Subject: [PATCH] Start removing some warnings --- crates/collab_ui/src/contact_list.rs | 4 ++-- crates/editor/src/element.rs | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/crates/collab_ui/src/contact_list.rs b/crates/collab_ui/src/contact_list.rs index e624abfcd549a7fa7947dcf61ea94da231dbdf9f..76538b6a7eb9b882b3d2afc72114fc24b2034562 100644 --- a/crates/collab_ui/src/contact_list.rs +++ b/crates/collab_ui/src/contact_list.rs @@ -827,7 +827,7 @@ impl ContactList { .with_child( Stack::new() .with_child( - Canvas::new(move |scene, bounds, _, _, cx| { + Canvas::new(move |scene, bounds, _, _, _| { let start_x = bounds.min_x() + (bounds.width() / 2.) - (tree_branch.width / 2.); let end_x = bounds.max_x(); @@ -924,7 +924,7 @@ impl ContactList { .with_child( Stack::new() .with_child( - Canvas::new(move |scene, bounds, _, _, cx| { + Canvas::new(move |scene, bounds, _, _, _| { let start_x = bounds.min_x() + (bounds.width() / 2.) - (tree_branch.width / 2.); let end_x = bounds.max_x(); diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 22cc9f7a6d9a6261a60478f729918bd2240943ba..5f9cd38d6ac49483615bfdcdbf9d832961c74377 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -118,7 +118,6 @@ impl EditorElement { text_bounds: RectF, gutter_bounds: RectF, bounds: RectF, - cx: &mut ViewContext, ) { enum EditorElementMouseHandlers {} scene.push_mouse_region( @@ -466,7 +465,6 @@ impl EditorElement { gutter_bounds: RectF, text_bounds: RectF, layout: &LayoutState, - cx: &mut ViewContext, ) { let bounds = gutter_bounds.union_rect(text_bounds); let scroll_top = @@ -737,7 +735,6 @@ impl EditorElement { scroll_top, scroll_left, bounds, - cx, ); for bound in range_to_bounds( @@ -783,7 +780,6 @@ impl EditorElement { scroll_top, scroll_left, bounds, - cx, ); } @@ -805,7 +801,6 @@ impl EditorElement { scroll_top, scroll_left, bounds, - cx, ); if editor.show_local_cursors(cx) || *replica_id != local_replica_id { @@ -1128,7 +1123,6 @@ impl EditorElement { scroll_top: f32, scroll_left: f32, bounds: RectF, - cx: &mut ViewContext, ) { let start_row = layout.visible_display_row_range.start; let end_row = layout.visible_display_row_range.end; @@ -2071,10 +2065,9 @@ impl Drawable for EditorElement { text_bounds, gutter_bounds, bounds, - cx, ); - self.paint_background(scene, gutter_bounds, text_bounds, layout, cx); + self.paint_background(scene, gutter_bounds, text_bounds, layout); if layout.gutter_size.x() > 0. { self.paint_gutter(scene, gutter_bounds, visible_bounds, layout, editor, cx); }