Use the same name for type parameters

This commit is contained in:
Ivan Ukhov 2015-06-19 13:15:42 -04:00
parent bdd468d177
commit 0d079a05c6
3 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ pub struct Database<'l> {
impl<'l> Database<'l> {
/// Open a connection to a new or existing database.
pub fn open<P: AsRef<Path>>(path: P) -> Result<Database<'l>> {
pub fn open<T: AsRef<Path>>(path: T) -> Result<Database<'l>> {
let mut raw = 0 as *mut _;
unsafe {
success!(ffi::sqlite3_open_v2(path_to_c_str!(path.as_ref()), &mut raw,

View File

@ -97,7 +97,7 @@ pub type Result<T> = std::result::Result<T, Error>;
/// Open a connection to a new or existing database.
#[inline]
pub fn open<'l, P: AsRef<std::path::Path>>(path: P) -> Result<Database<'l>> {
pub fn open<'l, T: AsRef<std::path::Path>>(path: T) -> Result<Database<'l>> {
Database::open(path)
}

View File

@ -40,7 +40,7 @@ impl<'l> Statement<'l> {
///
/// The leftmost location has the index 1.
#[inline]
pub fn bind<P: Parameter>(&mut self, i: usize, parameter: P) -> Result<()> {
pub fn bind<T: Parameter>(&mut self, i: usize, parameter: T) -> Result<()> {
parameter.bind(self, i)
}
@ -48,7 +48,7 @@ impl<'l> Statement<'l> {
///
/// The leftmost column has the index 0.
#[inline]
pub fn read<V: Value>(&self, i: usize) -> Result<V> {
pub fn read<T: Value>(&self, i: usize) -> Result<T> {
Value::read(self, i)
}