Document SqlState variants

This commit is contained in:
Steven Fackler 2015-03-31 23:52:03 -07:00
parent a462f10258
commit 57f486697a

View File

@ -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();