Adapt tui generator to the 2024 edition

Code has been adapted on the destination side and now the new generated code
cannot be compiled. Apply the same changes to the generator templates.
Change-Id: I9fe5e18ba3db240a0adf59c878f8742fb6dfa13a
This commit is contained in:
Artem Goncharov
2025年04月04日 11:03:21 +02:00
parent 0f870d5a5f
commit 04ae7d1c4e

View File

@@ -60,7 +60,7 @@ impl From<{{ prefix }}ApiRequest> for ApiRequest {
{%- if mod not in ["list", "show", "get", "delete", "update", "create", "set", "details"] %}
impl From<{{ mod_data.class_name }}> for {{ prefix }}ApiRequest {
fn from(item: {{ mod_data.class_name }}) -> Self {
{{ prefix }}ApiRequest::{{ mod_data.name }}(Box::new({{ mod_data.class_name }}::from(item)))
{{ prefix }}ApiRequest::{{ mod_data.name }}(Box::new(item))
}
}
{%- endif %}
@@ -87,7 +87,7 @@ impl ExecuteApiRequest for {{ prefix }}ApiRequest {
) -> Result<(), CloudWorkerError> {
match self {
{% for mod, mod_data in mod_list|dictsort -%}
{{ prefix }}ApiRequest::{{ mod_data.name }}(ref req) => {
{{ prefix }}ApiRequest::{{ mod_data.name }}(req) => {
req.execute_request(session, request, app_tx).await?;
}
{% endfor %}
Reference in New Issue
openstack/codegenerator
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.