mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 22:44:17 +00:00
remove unused methods from Arguments: is_empty, len, size
This commit is contained in:
parent
05bc3ba987
commit
d3d58ef0cf
3 changed files with 0 additions and 28 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue