1
0
Fork 0

remove trailing doc comment lines

This commit is contained in:
Cyborus 2024-02-09 22:49:32 -05:00
parent e53fa0b631
commit ed27e3d714
No known key found for this signature in database
3 changed files with 12 additions and 642 deletions

View file

@ -124,6 +124,9 @@ fn method_docs(spec: &OpenApiV2, op: &Operation) -> eyre::Result<String> {
}
}
}
if out.ends_with("/// \n") {
out.truncate(out.len() - 5);
}
Ok(out)
}

View file

@ -90,6 +90,9 @@ pub fn create_struct_for_definition(
fields.push_str(line);
fields.push_str("\n/// \n");
}
if fields.ends_with("/// \n") {
fields.truncate(fields.len() - 5);
}
}
}
if &field_name != prop_name {
@ -173,6 +176,9 @@ fn create_struct_docs_str(description: Option<&str>) -> eyre::Result<String> {
out.push_str(line);
out.push_str("\n/// \n");
}
if out.ends_with("/// \n") {
out.truncate(out.len() - 5);
}
out
}
None => String::new(),
@ -265,6 +271,9 @@ fn create_query_struct(spec: &OpenApiV2, op: &Operation) -> eyre::Result<String>
fields.push_str(line);
fields.push_str("\n/// \n");
}
if fields.ends_with("/// \n") {
fields.truncate(fields.len() - 5);
}
}
fields.push_str("pub ");
fields.push_str(&field_name);

File diff suppressed because it is too large Load diff