@@ -22,26 +22,26 @@ pub fn struct_def(
22
22
) -> std:: fmt:: Result {
23
23
write ! (
24
24
f,
25
- r# "/// {}
25
+ r"/// {}
26
26
///
27
27
/// Source: <{}>
28
- #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]"# ,
28
+ #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]" ,
29
29
section. doc,
30
30
section. url. unwrap( ) ,
31
31
) ?;
32
32
33
33
if !is_exhaustive {
34
34
write ! (
35
35
f,
36
- r# "
37
- #[non_exhaustive]"#
36
+ r"
37
+ #[non_exhaustive]"
38
38
) ?;
39
39
}
40
40
41
41
write ! (
42
42
f,
43
- r# "
44
- pub enum {} {{"# ,
43
+ r"
44
+ pub enum {} {{" ,
45
45
section. key,
46
46
) ?;
47
47
for member in list {
@@ -72,9 +72,9 @@ pub fn display_impl(
72
72
) -> std:: fmt:: Result {
73
73
write ! (
74
74
f,
75
- r# "impl core::fmt::Display for {} {{
75
+ r"impl core::fmt::Display for {} {{
76
76
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {{
77
- match self {{"# ,
77
+ match self {{" ,
78
78
section. key,
79
79
) ?;
80
80
@@ -97,10 +97,10 @@ pub fn display_impl(
97
97
98
98
writeln ! (
99
99
f,
100
- r# "
100
+ r"
101
101
}}
102
102
}}
103
- }}"# ,
103
+ }}" ,
104
104
)
105
105
}
106
106
@@ -117,11 +117,11 @@ pub fn from_str_impl(
117
117
} ;
118
118
write ! (
119
119
f,
120
- r# "impl core::str::FromStr for {} {{
120
+ r"impl core::str::FromStr for {} {{
121
121
type Err = {err_ty};
122
122
123
123
fn from_str(s: &str) -> Result<Self, Self::Err> {{
124
- match s {{"# ,
124
+ match s {{" ,
125
125
section. key,
126
126
) ?;
127
127
@@ -137,23 +137,23 @@ pub fn from_str_impl(
137
137
if is_exhaustive {
138
138
write ! (
139
139
f,
140
- r# "
141
- _ => Err(crate::ParseError::new()),"#
140
+ r"
141
+ _ => Err(crate::ParseError::new()),"
142
142
) ?;
143
143
} else {
144
144
write ! (
145
145
f,
146
- r# "
147
- value => Ok(Self::Unknown(value.to_owned())),"# ,
146
+ r"
147
+ value => Ok(Self::Unknown(value.to_owned()))," ,
148
148
) ?;
149
149
}
150
150
151
151
writeln ! (
152
152
f,
153
- r# "
153
+ r"
154
154
}}
155
155
}}
156
- }}"# ,
156
+ }}" ,
157
157
)
158
158
}
159
159
@@ -179,22 +179,22 @@ impl schemars::JsonSchema for {} {{
179
179
for member in list {
180
180
write ! (
181
181
f,
182
- r# "
182
+ r"
183
183
// ---
184
- schemars::schema::SchemaObject {{"# ,
184
+ schemars::schema::SchemaObject {{" ,
185
185
) ?;
186
186
187
187
if let Some ( description) = & member. description {
188
188
write ! (
189
189
f,
190
- r# "
190
+ r"
191
191
metadata: Some(Box::new(schemars::schema::Metadata {{
192
192
description: Some(
193
193
// ---
194
194
{}.to_owned(),
195
195
),
196
196
..Default::default()
197
- }})),"# ,
197
+ }}))," ,
198
198
raw_string( description) ,
199
199
) ?;
200
200
}
@@ -212,7 +212,7 @@ impl schemars::JsonSchema for {} {{
212
212
213
213
writeln ! (
214
214
f,
215
- r# "
215
+ r"
216
216
];
217
217
218
218
let description = {};
@@ -229,7 +229,7 @@ impl schemars::JsonSchema for {} {{
229
229
}}
230
230
.into()
231
231
}}
232
- }}"# ,
232
+ }}" ,
233
233
raw_string( section. doc) ,
234
234
)
235
235
}
0 commit comments