Skip to content

Commit 0198c55

Browse files
committed
updated tests for rust
1 parent 976a7a0 commit 0198c55

File tree

7 files changed

+666
-511
lines changed

7 files changed

+666
-511
lines changed

lib/codegen/rust/actix.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ String kTemplateParams = """
3939
let payload = serde_json::json!({{body}});
4040
4141
""";
42-
43-
String kTemplateHeaders =
44-
"""\n {% for key, val in headers -%}.insert_header(("{{key}}", "{{val}}")){% if not loop.last %}{{ '\n ' }}{% endif %}{%- endfor -%}""";
42+
String kTemplateHeaders =
43+
"""
44+
\n {% for key, val in headers -%}request = request.insert_header(("{{key}}", "{{val}}"));{{ '\n ' }}{%- endfor -%}""";
4545

4646
String kTemplateFormHeaderContentType = '''
4747
multipart/form-data; boundary={{boundary}}''';

lib/codegen/rust/hyper.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2323
final String kTemplateParams = """
2424
{% for key, values in params %}{% for val in values %}
2525
url.query_pairs_mut().append_pair("{{ key }}", "{{ val }}");{% endfor %}{% endfor %}
26+
2627
""";
2728

2829
final String kTemplateMethod = """

0 commit comments

Comments
 (0)