Skip to content

Commit 8b80eba

Browse files
committed
Add a name accessor to Type
Also fix up some misentered type info and add a test to ensure it's correct.
1 parent 7e397a8 commit 8b80eba

File tree

3 files changed

+191
-169
lines changed

3 files changed

+191
-169
lines changed

src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ impl InnerConnection {
665665
}
666666

667667
fn get_type(&mut self, oid: Oid) -> Result<Type> {
668-
if let Some(ty) = Type::new(oid) {
668+
if let Some(ty) = Type::from_oid(oid) {
669669
return Ok(ty);
670670
}
671671

@@ -1353,10 +1353,6 @@ trait DbErrorNew {
13531353
fn new<T>(fields: Vec<(u8, String)>) -> Result<T>;
13541354
}
13551355

1356-
trait TypeNew {
1357-
fn new(oid: Oid) -> Option<Type>;
1358-
}
1359-
13601356
trait RowsNew<'a> {
13611357
fn new(stmt: &'a Statement<'a>, data: Vec<Vec<Option<Vec<u8>>>>) -> Rows<'a>;
13621358
}

0 commit comments

Comments
 (0)