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:
Piotr Osiewicz
2025-03-31 20:10:36 +02:00
committed by GitHub
parent d51aa2ffb0
commit 0729d24d77
162 changed files with 2333 additions and 1937 deletions
+11 -11
View File
@@ -68,7 +68,7 @@ pub trait Action: 'static + Send {
/// Optional JSON schema for the action's input data.
fn action_json_schema(
_: &mut schemars::gen::SchemaGenerator,
_: &mut schemars::r#gen::SchemaGenerator,
) -> Option<schemars::schema::Schema>
where
Self: Sized,
@@ -167,7 +167,7 @@ impl Default for ActionRegistry {
struct ActionData {
pub build: ActionBuilder,
pub json_schema: fn(&mut schemars::gen::SchemaGenerator) -> Option<schemars::schema::Schema>,
pub json_schema: fn(&mut schemars::r#gen::SchemaGenerator) -> Option<schemars::schema::Schema>,
}
/// This type must be public so that our macros can build it in other crates.
@@ -183,7 +183,7 @@ pub struct MacroActionData {
pub aliases: &'static [&'static str],
pub type_id: TypeId,
pub build: ActionBuilder,
pub json_schema: fn(&mut schemars::gen::SchemaGenerator) -> Option<schemars::schema::Schema>,
pub json_schema: fn(&mut schemars::r#gen::SchemaGenerator) -> Option<schemars::schema::Schema>,
}
inventory::collect!(MacroActionBuilder);
@@ -271,7 +271,7 @@ impl ActionRegistry {
pub fn action_schemas(
&self,
generator: &mut schemars::gen::SchemaGenerator,
generator: &mut schemars::r#gen::SchemaGenerator,
) -> Vec<(SharedString, Option<schemars::schema::Schema>)> {
// Use the order from all_names so that the resulting schema has sensible order.
self.all_names
@@ -310,7 +310,7 @@ macro_rules! actions {
Ok(Box::new(Self))
},
fn action_json_schema(
_: &mut gpui::private::schemars::gen::SchemaGenerator,
_: &mut gpui::private::schemars::r#gen::SchemaGenerator,
) -> Option<gpui::private::schemars::schema::Schema> {
None
}
@@ -347,7 +347,7 @@ macro_rules! action_as {
Ok(Box::new(Self))
},
fn action_json_schema(
generator: &mut gpui::private::schemars::gen::SchemaGenerator,
generator: &mut gpui::private::schemars::r#gen::SchemaGenerator,
) -> Option<gpui::private::schemars::schema::Schema> {
None
}
@@ -381,7 +381,7 @@ macro_rules! action_with_deprecated_aliases {
},
fn action_json_schema(
generator: &mut gpui::private::schemars::gen::SchemaGenerator,
generator: &mut gpui::private::schemars::r#gen::SchemaGenerator,
) -> Option<gpui::private::schemars::schema::Schema> {
None
},
@@ -412,7 +412,7 @@ macro_rules! impl_action_with_deprecated_aliases {
},
fn action_json_schema(
generator: &mut gpui::private::schemars::gen::SchemaGenerator,
generator: &mut gpui::private::schemars::r#gen::SchemaGenerator,
) -> Option<gpui::private::schemars::schema::Schema> {
Some(<Self as gpui::private::schemars::JsonSchema>::json_schema(
generator,
@@ -446,7 +446,7 @@ macro_rules! impl_actions {
Ok(std::boxed::Box::new(gpui::private::serde_json::from_value::<Self>(value)?))
},
fn action_json_schema(
generator: &mut gpui::private::schemars::gen::SchemaGenerator,
generator: &mut gpui::private::schemars::r#gen::SchemaGenerator,
) -> Option<gpui::private::schemars::schema::Schema> {
Some(<Self as gpui::private::schemars::JsonSchema>::json_schema(
generator,
@@ -479,7 +479,7 @@ macro_rules! impl_internal_actions {
)))
},
fn action_json_schema(
generator: &mut gpui::private::schemars::gen::SchemaGenerator,
generator: &mut gpui::private::schemars::r#gen::SchemaGenerator,
) -> Option<gpui::private::schemars::schema::Schema> {
None
}
@@ -509,7 +509,7 @@ macro_rules! impl_action_as {
))
},
fn action_json_schema(
generator: &mut gpui::private::schemars::gen::SchemaGenerator,
generator: &mut gpui::private::schemars::r#gen::SchemaGenerator,
) -> Option<gpui::private::schemars::schema::Schema> {
Some(<Self as gpui::private::schemars::JsonSchema>::json_schema(
generator,