@@ -9,17 +9,17 @@ use std::fmt::{self, Write};
99/// A tuple of arguments to be sent to the database.
1010// This lint is designed for general collections, but `Arguments` is not meant to be as such.
1111#[ allow( clippy:: len_without_is_empty) ]
12- pub trait Arguments < ' q > : Send + Sized + Default {
12+ pub trait Arguments : Send + Sized + Default {
1313 type Database : Database ;
1414
1515 /// Reserves the capacity for at least `additional` more values (of `size` total bytes) to
1616 /// be added to the arguments without a reallocation.
1717 fn reserve ( & mut self , additional : usize , size : usize ) ;
1818
1919 /// Add the value to the end of the arguments.
20- fn add < T > ( & mut self , value : T ) -> Result < ( ) , BoxDynError >
20+ fn add < ' t , T > ( & mut self , value : T ) -> Result < ( ) , BoxDynError >
2121 where
22- T : ' q + Encode < ' q , Self :: Database > + Type < Self :: Database > ;
22+ T : Encode < ' t , Self :: Database > + Type < Self :: Database > ;
2323
2424 /// The number of arguments that were already added.
2525 fn len ( & self ) -> usize ;
@@ -29,19 +29,17 @@ pub trait Arguments<'q>: Send + Sized + Default {
2929 }
3030}
3131
32- pub trait IntoArguments < ' q , DB : Database > : Sized + Send {
33- fn into_arguments ( self ) -> <DB as Database >:: Arguments < ' q > ;
32+ pub trait IntoArguments < DB : Database > : Sized + Send {
33+ fn into_arguments ( self ) -> <DB as Database >:: Arguments ;
3434}
3535
3636// NOTE: required due to lack of lazy normalization
3737#[ macro_export]
3838macro_rules! impl_into_arguments_for_arguments {
3939 ( $Arguments: path) => {
40- impl <' q>
41- $crate:: arguments:: IntoArguments <
42- ' q,
43- <$Arguments as $crate:: arguments:: Arguments <' q>>:: Database ,
44- > for $Arguments
40+ impl
41+ $crate:: arguments:: IntoArguments <<$Arguments as $crate:: arguments:: Arguments >:: Database >
42+ for $Arguments
4543 {
4644 fn into_arguments( self ) -> $Arguments {
4745 self
@@ -51,13 +49,10 @@ macro_rules! impl_into_arguments_for_arguments {
5149}
5250
5351/// used by the query macros to prevent supernumerary `.bind()` calls
54- pub struct ImmutableArguments < ' q , DB : Database > ( pub <DB as Database >:: Arguments < ' q > ) ;
52+ pub struct ImmutableArguments < DB : Database > ( pub <DB as Database >:: Arguments ) ;
5553
56- impl < ' q , DB : Database > IntoArguments < ' q , DB > for ImmutableArguments < ' q , DB > {
57- fn into_arguments ( self ) -> <DB as Database >:: Arguments < ' q > {
54+ impl < DB : Database > IntoArguments < DB > for ImmutableArguments < DB > {
55+ fn into_arguments ( self ) -> <DB as Database >:: Arguments {
5856 self . 0
5957 }
6058}
61-
62- // TODO: Impl `IntoArguments` for &[&dyn Encode]
63- // TODO: Impl `IntoArguments` for (impl Encode, ...) x16
0 commit comments