Skip to content

Commit 28b7f05

Browse files
committed
Fix warnings
1 parent a8ed34b commit 28b7f05

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

postgres/src/rows.rs

-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ impl<'a> Row<'a> {
236236
if !<T as FromSql>::accepts(ty) {
237237
return Some(Err(Error::Conversion(Box::new(WrongType::new(ty.clone())))));
238238
}
239-
let conn = self.stmt.conn().0.borrow();
240239
let value = FromSql::from_sql_nullable(ty, self.data.get(idx));
241240
Some(value.map_err(Error::Conversion))
242241
}

postgres/src/stmt.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Prepared statements
22
33
use fallible_iterator::FallibleIterator;
4-
use std::cell::{Cell, RefMut};
4+
use std::cell::Cell;
55
use std::collections::VecDeque;
66
use std::fmt;
77
use std::io::{self, Read, Write};
@@ -13,8 +13,8 @@ use error::Error;
1313
use types::{Type, ToSql};
1414
use rows::{Rows, LazyRows};
1515
use transaction::Transaction;
16-
use {bad_response, err, Connection, StatementInternals, Result, RowsNew, InnerConnection,
17-
LazyRowsNew, ColumnNew, StatementInfo, TransactionInternals};
16+
use {bad_response, err, Connection, StatementInternals, Result, RowsNew, LazyRowsNew, ColumnNew,
17+
StatementInfo, TransactionInternals};
1818

1919
/// A prepared statement.
2020
pub struct Statement<'conn> {
@@ -301,7 +301,7 @@ impl<'conn> Statement<'conn> {
301301
}
302302
};
303303

304-
let mut info = CopyInfo {
304+
let info = CopyInfo {
305305
format: Format::from_u16(format as u16),
306306
column_formats: column_formats,
307307
};
@@ -427,7 +427,7 @@ impl<'conn> Statement<'conn> {
427427
}
428428
};
429429

430-
let mut info = CopyInfo {
430+
let info = CopyInfo {
431431
format: Format::from_u16(format as u16),
432432
column_formats: column_formats,
433433
};

tokio-postgres/src/rows.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
use postgres_shared::rows::RowData;
44
use postgres_shared::stmt::Column;
5-
use std::collections::HashMap;
65
use std::error::Error;
76
use std::fmt;
87
use std::sync::Arc;

0 commit comments

Comments
 (0)