mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-15 06:20:50 +00:00
Use the same name for type parameters
This commit is contained in:
parent
bdd468d177
commit
0d079a05c6
@ -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,
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user