fix macro comment gen
This commit is contained in:
parent
9715790574
commit
0638e00677
1 changed files with 11 additions and 3 deletions
|
@ -159,7 +159,7 @@ pub struct ParsedSectionHeader<'a> {
|
||||||
|
|
||||||
macro_rules! generate_case_insensitive {
|
macro_rules! generate_case_insensitive {
|
||||||
($name:ident, $inner_type:ty, $comment:literal) => {
|
($name:ident, $inner_type:ty, $comment:literal) => {
|
||||||
/// Wrapper struct for $comment, since $comment are case-insensitive.
|
#[doc = $comment]
|
||||||
#[derive(Clone, Eq, Ord, Debug, Default)]
|
#[derive(Clone, Eq, Ord, Debug, Default)]
|
||||||
pub struct $name<'a>(pub $inner_type);
|
pub struct $name<'a>(pub $inner_type);
|
||||||
|
|
||||||
|
@ -217,8 +217,16 @@ macro_rules! generate_case_insensitive {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_case_insensitive!(SectionHeaderName, Cow<'a, str>, "section names");
|
generate_case_insensitive!(
|
||||||
generate_case_insensitive!(Key, Cow<'a, str>, "keys");
|
SectionHeaderName,
|
||||||
|
Cow<'a, str>,
|
||||||
|
"Wrapper struct for section header names, since section headers are case-insensitive."
|
||||||
|
);
|
||||||
|
generate_case_insensitive!(
|
||||||
|
Key,
|
||||||
|
Cow<'a, str>,
|
||||||
|
"Wrapper struct for key names, since keys are case-insensitive."
|
||||||
|
);
|
||||||
|
|
||||||
impl ParsedSectionHeader<'_> {
|
impl ParsedSectionHeader<'_> {
|
||||||
/// Generates a byte representation of the value. This should be used when
|
/// Generates a byte representation of the value. This should be used when
|
||||||
|
|
Reference in a new issue