Rename SqlState::Unknown to Other

In line with Type
This commit is contained in:
Steven Fackler 2016-01-02 21:52:26 -08:00
parent 59b9d66890
commit da08d6411f

View File

@ -358,7 +358,7 @@ pub enum SqlState {{
write!(file,
" /// An unknown code
Unknown(String)
Other(String)
}}
"
).unwrap();
@ -381,7 +381,7 @@ impl SqlState {{
pub fn from_code(s: String) -> SqlState {{
match SQLSTATE_MAP.get(&*s) {{
Some(state) => state.clone(),
None => SqlState::Unknown(s)
None => SqlState::Other(s)
}}
}}
@ -397,7 +397,7 @@ impl SqlState {{
}
write!(file, r#"
SqlState::Unknown(ref s) => s,
SqlState::Other(ref s) => s,
}}
}}
}}
@ -419,7 +419,7 @@ impl fmt::Debug for SqlState {{
}
write!(file, r#"
SqlState::Unknown(ref s) => return write!(fmt, "Unknown({{:?}})", s),
SqlState::Other(ref s) => return write!(fmt, "Other({{:?}})", s),
}};
fmt.write_str(s)
}}