Skip to content

Commit 6ea69b9

Browse files
committed
refactoring
1 parent bbd062e commit 6ea69b9

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

compiler-rs/clients_schema_to_openapi/src/paths.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,8 @@ fn get_path_parameters(template: &str) -> Vec<&str> {
315315

316316
fn split_summary_desc(desc: String) -> SplitDesc{
317317
let mut parts = desc.split(['.','\n',':']);
318-
if parts.clone().count() == 1{
319-
return SplitDesc {
320-
summary: String::from(parts.next().unwrap()),
321-
description: String::new()
322-
}
323-
}
324318
let first_line = parts.next().unwrap_or_else(|| "");
319+
325320
let new_desc = desc.replace(first_line,"");
326321
let trim = new_desc.trim();
327322
let remove_period = trim.strip_prefix('.').unwrap_or_else(|| trim);
@@ -330,7 +325,6 @@ fn split_summary_desc(desc: String) -> SplitDesc{
330325
summary: String::from(first_line.trim()),
331326
description: String::from(remove_column.trim())
332327
}
333-
334328
}
335329

336330
struct SplitDesc {
Binary file not shown.

0 commit comments

Comments
 (0)