diff options
author | Cyborus <cyborus@cyborus.xyz> | 2024-01-30 04:05:31 +0100 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2024-01-30 04:05:31 +0100 |
commit | 787adac1a4f6e193fc5ff7c75d789915e1f2ce05 (patch) | |
tree | ebb3bc7307b66f924e5ac306527c6d9f91a04e95 /generator | |
parent | improve openapi verification (diff) | |
download | forgejo-api-787adac1a4f6e193fc5ff7c75d789915e1f2ce05.tar.xz forgejo-api-787adac1a4f6e193fc5ff7c75d789915e1f2ce05.zip |
put `query` directly in format string
Diffstat (limited to 'generator')
-rw-r--r-- | generator/src/methods.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/generator/src/methods.rs b/generator/src/methods.rs index 3ad34c7..0e285ad 100644 --- a/generator/src/methods.rs +++ b/generator/src/methods.rs @@ -349,8 +349,7 @@ fn create_method_request( let mut fmt_str = sanitize_path_arg(path)?; let mut fmt_args = String::new(); if has_query { - fmt_str.push_str("?{}"); - fmt_args.push_str(", query.to_string()"); + fmt_str.push_str("?{query}"); } let path_arg = if fmt_str.contains("{") { format!("&format!(\"{fmt_str}\"{fmt_args})") |