Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Dec 5, 2023
1 parent 1623cc0 commit 904fd47
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions macro/src/dialect/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,14 +576,15 @@ impl<'a> Operation<'a> {
summary: {
let summary = definition.str_value("summary")?;

if summary.is_empty() {
format!("[`{short_name}`]({class_name}) operation.")
} else {
format!(
"[`{short_name}`]({class_name}) operation. {}.",
summary[0..1].to_uppercase() + &summary[1..]
)
}
[
format!("[`{short_name}`]({class_name}) operation."),
if summary.is_empty() {
Default::default()
} else {
summary[0..1].to_uppercase() + &summary[1..] + "."
},
]
.join(" ")
},
description: unindent::unindent(definition.str_value("description")?),
regions,
Expand Down

0 comments on commit 904fd47

Please sign in to comment.