Document SqlState variants
This commit is contained in:
parent
a462f10258
commit
57f486697a
11
build.rs
11
build.rs
@ -342,19 +342,20 @@ fn make_enum(file: &mut BufWriter<File>) {
|
||||
write!(file,
|
||||
r#"/// SQLSTATE error codes
|
||||
#[derive(PartialEq, Eq, Clone)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum SqlState {{
|
||||
"#
|
||||
).unwrap();
|
||||
|
||||
for &(_, variant) in SQLSTATES {
|
||||
for &(code, variant) in SQLSTATES {
|
||||
write!(file,
|
||||
" {},\n",
|
||||
variant).unwrap();
|
||||
" /// `{}`
|
||||
{},\n",
|
||||
code, variant).unwrap();
|
||||
}
|
||||
|
||||
write!(file,
|
||||
" Unknown(String)
|
||||
" /// An unknown code
|
||||
Unknown(String)
|
||||
}}
|
||||
"
|
||||
).unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user