We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 857f8eb commit 838df94Copy full SHA for 838df94
1 file changed
src/types/mod.rs
@@ -232,17 +232,13 @@ macro_rules! make_postgres_type {
232
}
233
234
235
- /// Returns the element `Type` if this `Type` is an array.
236
- ///
237
- /// # Panics
238
239
- /// Panics if this `Type` is not an array.
240
- pub fn member_type(&self) -> Type {
+ /// Returns the member `Type` if this `Type` is an array.
+ pub fn member_type(&self) -> Option<Type> {
241
match *self {
242
$(
243
- $(Type::$variant => Type::$member,)*
+ $(Type::$variant => Some(Type::$member),)*
244
)+
245
- _ => unreachable!()
+ _ => None
246
247
248
0 commit comments