Skip to content

Commit c8cc379

Browse files
committed
Fix deprecation warnings
1 parent 0c1dccf commit c8cc379

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ pub struct PostgresDbError {
481481
impl PostgresDbError {
482482
#[doc(hidden)]
483483
pub fn new(fields: Vec<(u8, String)>) -> PostgresDbError {
484-
let mut map: HashMap<_, _> = fields.move_iter().collect();
484+
let mut map: HashMap<_, _> = fields.into_iter().collect();
485485
PostgresDbError {
486486
severity: map.pop(&('S' as u8)).unwrap(),
487487
code: PostgresSqlState::from_code(map.pop(&('C' as u8)).unwrap().as_slice()),

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ impl InnerPostgresConnection {
552552

553553
let mut result_desc: Vec<ResultDescription> = match try_pg!(self.read_message()) {
554554
RowDescription { descriptions } => {
555-
descriptions.move_iter().map(|RowDescriptionEntry { name, type_oid, .. }| {
555+
descriptions.into_iter().map(|RowDescriptionEntry { name, type_oid, .. }| {
556556
ResultDescription {
557557
name: name,
558558
ty: PostgresType::from_oid(type_oid)
@@ -598,7 +598,7 @@ impl InnerPostgresConnection {
598598
}
599599
let name = try!(self.quick_query(format!("SELECT typname FROM pg_type \
600600
WHERE oid={}", oid).as_slice()))
601-
.move_iter().next().unwrap().move_iter().next().unwrap().unwrap();
601+
.into_iter().next().unwrap().into_iter().next().unwrap().unwrap();
602602
self.unknown_types.insert(oid, name.clone());
603603
Ok(name)
604604
}
@@ -627,7 +627,7 @@ impl InnerPostgresConnection {
627627
match try_pg!(self.read_message()) {
628628
ReadyForQuery { .. } => break,
629629
DataRow { row } => {
630-
result.push(row.move_iter().map(|opt| {
630+
result.push(row.into_iter().map(|opt| {
631631
opt.map(|b| String::from_utf8_lossy(b.as_slice()).into_string())
632632
}).collect());
633633
}

0 commit comments

Comments
 (0)