Fix warnings

This commit is contained in:
Antonio Scandurra 2023-12-21 15:26:41 +01:00
parent 176a022b10
commit 5e4557ed16
2 changed files with 11 additions and 13 deletions

View File

@ -30,9 +30,9 @@ use fs::Fs;
use futures::StreamExt; use futures::StreamExt;
use gpui::{ use gpui::{
canvas, div, point, relative, rems, uniform_list, Action, AnyElement, AppContext, canvas, div, point, relative, rems, uniform_list, Action, AnyElement, AppContext,
AsyncWindowContext, AvailableSpace, ClipboardItem, Context, Div, EventEmitter, FocusHandle, AsyncWindowContext, ClipboardItem, Context, Div, EventEmitter, FocusHandle, Focusable,
Focusable, FocusableView, FontStyle, FontWeight, HighlightStyle, InteractiveElement, FocusableView, FontStyle, FontWeight, HighlightStyle, InteractiveElement, IntoElement, Model,
IntoElement, Model, ModelContext, ParentElement, Pixels, PromptLevel, Render, SharedString, ModelContext, ParentElement, Pixels, PromptLevel, Render, SharedString,
StatefulInteractiveElement, Styled, Subscription, Task, TextStyle, UniformListScrollHandle, StatefulInteractiveElement, Styled, Subscription, Task, TextStyle, UniformListScrollHandle,
View, ViewContext, VisualContext, WeakModel, WeakView, WhiteSpace, WindowContext, View, ViewContext, VisualContext, WeakModel, WeakView, WhiteSpace, WindowContext,
}; };

View File

@ -1,11 +1,11 @@
use editor::{Cursor, HighlightedRange, HighlightedRangeLine}; use editor::{Cursor, HighlightedRange, HighlightedRangeLine};
use gpui::{ use gpui::{
black, div, fill, point, px, red, relative, AnyElement, AsyncWindowContext, AvailableSpace, black, div, fill, point, px, red, relative, AnyElement, AsyncWindowContext, BorrowWindow,
BorrowWindow, Bounds, DispatchPhase, Element, ElementId, ExternalPaths, FocusHandle, Font, Bounds, DispatchPhase, Element, ElementId, ExternalPaths, FocusHandle, Font, FontStyle,
FontStyle, FontWeight, HighlightStyle, Hsla, InteractiveElement, InteractiveElementState, FontWeight, HighlightStyle, Hsla, InteractiveElement, InteractiveElementState, Interactivity,
Interactivity, IntoElement, LayoutId, Model, ModelContext, ModifiersChangedEvent, MouseButton, IntoElement, LayoutId, Model, ModelContext, ModifiersChangedEvent, MouseButton, Pixels,
Pixels, PlatformInputHandler, Point, Rgba, ShapedLine, Size, StatefulInteractiveElement, PlatformInputHandler, Point, Rgba, ShapedLine, StatefulInteractiveElement, Styled, TextRun,
Styled, TextRun, TextStyle, TextSystem, UnderlineStyle, WhiteSpace, WindowContext, TextStyle, TextSystem, UnderlineStyle, WhiteSpace, WindowContext,
}; };
use itertools::Itertools; use itertools::Itertools;
use language::CursorShape; use language::CursorShape;
@ -854,10 +854,8 @@ impl Element for TerminalElement {
}); });
} }
if let Some(mut element) = layout.hyperlink_tooltip.take() { if let Some(element) = layout.hyperlink_tooltip.take() {
let width: AvailableSpace = bounds.size.width.into(); element.draw(origin, bounds.size, cx)
let height: AvailableSpace = bounds.size.height.into();
element.draw(origin, Size { width, height }, cx)
} }
}); });
} }