improve enum docs

This commit is contained in:
OMGeeky
2024-05-18 17:42:26 +02:00
parent ef00af9d13
commit 56643c8bde

View File

@@ -76,9 +76,7 @@ impl Default for Scope {
// region ${enum_type}
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
% if e.get('description'):
% for line in e.description.splitlines():
/// ${line}
% endfor
${rust_doc_comment(e.description)}
% endif
pub enum ${enum_type} {
<%
@@ -95,10 +93,7 @@ if not enum_descriptions:
<% #print(variant_name, '=>', description)
%>
% if description:
% for line in description.splitlines():
/// ${line}
% endfor
///
${rust_doc_comment(description)}
% endif\
/// value:
/// "${variant_name}"