remove unused methods from Arguments: is_empty, len, size

This commit is contained in:
Ryan Leckey 2020-02-19 00:46:37 -08:00
parent 05bc3ba987
commit d3d58ef0cf
3 changed files with 0 additions and 28 deletions

View file

@ -8,18 +8,6 @@ use crate::types::HasSqlType;
pub trait Arguments: Send + Sized + Default + 'static {
type Database: Database + ?Sized;
/// Returns `true` if there are no values.
#[inline]
fn is_empty(&self) -> bool {
self.len() == 0
}
/// Returns the number of values.
fn len(&self) -> usize;
/// Returns the size of the arguments, in bytes.
fn size(&self) -> usize;
/// Reserves the capacity for at least `len` more values (of `size` bytes) to
/// be added to the arguments without a reallocation.
fn reserve(&mut self, len: usize, size: usize);

View file

@ -14,14 +14,6 @@ pub struct MySqlArguments {
impl Arguments for MySqlArguments {
type Database = MySql;
fn len(&self) -> usize {
self.param_types.len()
}
fn size(&self) -> usize {
self.params.len()
}
fn reserve(&mut self, len: usize, size: usize) {
self.param_types.reserve(len);
self.params.reserve(size);

View file

@ -18,14 +18,6 @@ pub struct PgArguments {
impl Arguments for PgArguments {
type Database = super::Postgres;
fn len(&self) -> usize {
self.types.len()
}
fn size(&self) -> usize {
self.values.len()
}
fn reserve(&mut self, len: usize, size: usize) {
self.types.reserve(len);
self.values.reserve(size);