Fix warnings

This commit is contained in:
Steven Fackler 2017-02-14 22:16:06 -08:00
parent a8ed34b66e
commit 28b7f05cb6
3 changed files with 5 additions and 7 deletions

View File

@ -236,7 +236,6 @@ impl<'a> Row<'a> {
if !<T as FromSql>::accepts(ty) {
return Some(Err(Error::Conversion(Box::new(WrongType::new(ty.clone())))));
}
let conn = self.stmt.conn().0.borrow();
let value = FromSql::from_sql_nullable(ty, self.data.get(idx));
Some(value.map_err(Error::Conversion))
}

View File

@ -1,7 +1,7 @@
//! Prepared statements
use fallible_iterator::FallibleIterator;
use std::cell::{Cell, RefMut};
use std::cell::Cell;
use std::collections::VecDeque;
use std::fmt;
use std::io::{self, Read, Write};
@ -13,8 +13,8 @@ use error::Error;
use types::{Type, ToSql};
use rows::{Rows, LazyRows};
use transaction::Transaction;
use {bad_response, err, Connection, StatementInternals, Result, RowsNew, InnerConnection,
LazyRowsNew, ColumnNew, StatementInfo, TransactionInternals};
use {bad_response, err, Connection, StatementInternals, Result, RowsNew, LazyRowsNew, ColumnNew,
StatementInfo, TransactionInternals};
/// A prepared statement.
pub struct Statement<'conn> {
@ -301,7 +301,7 @@ impl<'conn> Statement<'conn> {
}
};
let mut info = CopyInfo {
let info = CopyInfo {
format: Format::from_u16(format as u16),
column_formats: column_formats,
};
@ -427,7 +427,7 @@ impl<'conn> Statement<'conn> {
}
};
let mut info = CopyInfo {
let info = CopyInfo {
format: Format::from_u16(format as u16),
column_formats: column_formats,
};

View File

@ -2,7 +2,6 @@
use postgres_shared::rows::RowData;
use postgres_shared::stmt::Column;
use std::collections::HashMap;
use std::error::Error;
use std::fmt;
use std::sync::Arc;