chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791)
Successor to #27779 - in this PR I've applied changes manually, without futzing with if let lifetimes at all. Release Notes: - N/A
This commit is contained in:
parent
d51aa2ffb0
commit
0729d24d77
162 changed files with 2333 additions and 1937 deletions
|
@ -585,7 +585,7 @@ impl ContextMenu {
|
|||
item: &ContextMenuItem,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> impl IntoElement {
|
||||
) -> impl IntoElement + use<> {
|
||||
match item {
|
||||
ContextMenuItem::Separator => ListSeparator.into_any_element(),
|
||||
ContextMenuItem::Header(header) => ListSubHeader::new(header.clone())
|
||||
|
|
|
@ -34,10 +34,10 @@ impl Tooltip {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn for_action_title(
|
||||
title: impl Into<SharedString>,
|
||||
pub fn for_action_title<Title: Into<SharedString>>(
|
||||
title: Title,
|
||||
action: &dyn Action,
|
||||
) -> impl Fn(&mut Window, &mut App) -> AnyView {
|
||||
) -> impl Fn(&mut Window, &mut App) -> AnyView + use<Title> {
|
||||
let title = title.into();
|
||||
let action = action.boxed_clone();
|
||||
move |window, cx| {
|
||||
|
@ -50,11 +50,11 @@ impl Tooltip {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn for_action_title_in(
|
||||
title: impl Into<SharedString>,
|
||||
pub fn for_action_title_in<Str: Into<SharedString>>(
|
||||
title: Str,
|
||||
action: &dyn Action,
|
||||
focus_handle: &FocusHandle,
|
||||
) -> impl Fn(&mut Window, &mut App) -> AnyView {
|
||||
) -> impl Fn(&mut Window, &mut App) -> AnyView + use<Str> {
|
||||
let title = title.into();
|
||||
let action = action.boxed_clone();
|
||||
let focus_handle = focus_handle.clone();
|
||||
|
@ -166,11 +166,11 @@ impl Render for Tooltip {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn tooltip_container<V>(
|
||||
pub fn tooltip_container<V, ContentsBuilder: FnOnce(Div, &mut Window, &mut Context<V>) -> Div>(
|
||||
window: &mut Window,
|
||||
cx: &mut Context<V>,
|
||||
f: impl FnOnce(Div, &mut Window, &mut Context<V>) -> Div,
|
||||
) -> impl IntoElement {
|
||||
f: ContentsBuilder,
|
||||
) -> impl IntoElement + use<V, ContentsBuilder> {
|
||||
let ui_font = ThemeSettings::get_global(cx).ui_font.clone();
|
||||
|
||||
// padding to avoid tooltip appearing right below the mouse cursor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue