1
0
Fork 0

make *Query::to_string take self

This commit is contained in:
Cyborus 2024-01-16 18:38:24 -05:00
parent 0565c3f1c6
commit 53922bc465
No known key found for this signature in database

View file

@ -912,7 +912,7 @@ fn create_query_struct(spec: &OpenApiV2, path: &str, op: &Operation) -> eyre::Re
.as_ref()
.ok_or_else(|| eyre::eyre!("no op id found"))?
.to_pascal_case();
return Ok(format!("pub struct {op_name}Query {{\n{fields}\n}}\n\nimpl {op_name}Query {{\nfn to_string(&self) -> String {{\n{imp}\n}}\n}}"));
return Ok(format!("pub struct {op_name}Query {{\n{fields}\n}}\n\nimpl {op_name}Query {{\nfn to_string(self) -> String {{\n{imp}\n}}\n}}"));
}
}