Skip to content

Commit b239d13

Browse files
committed
refactor(sqlite): fix clippy lifetime elide warnings
Signed-off-by: Joshua Potts <[email protected]>
1 parent 5f46e08 commit b239d13

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

sqlx-sqlite/src/types/bool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Type<Sqlite> for bool {
1515
}
1616
}
1717

18-
impl<'q> Encode<'q, Sqlite> for bool {
18+
impl Encode<'_, Sqlite> for bool {
1919
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
2020
args.push(SqliteArgumentValue::Int((*self).into()));
2121

sqlx-sqlite/src/types/bytes.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl Type<Sqlite> for [u8] {
1919
}
2020
}
2121

22-
impl<'q> Encode<'q, Sqlite> for &'q [u8] {
22+
impl Encode<'_, Sqlite> for &'_ [u8] {
2323
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
2424
args.push(SqliteArgumentValue::Blob(self.to_vec()));
2525

@@ -57,7 +57,7 @@ impl Type<Sqlite> for Vec<u8> {
5757
}
5858
}
5959

60-
impl<'q> Encode<'q, Sqlite> for Vec<u8> {
60+
impl Encode<'_, Sqlite> for Vec<u8> {
6161
fn encode(self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
6262
args.push(SqliteArgumentValue::Blob(self));
6363

@@ -77,7 +77,7 @@ impl<'r> Decode<'r, Sqlite> for Vec<u8> {
7777
}
7878
}
7979

80-
impl<'q> Encode<'q, Sqlite> for Cow<'q, [u8]> {
80+
impl Encode<'_, Sqlite> for Cow<'_, [u8]> {
8181
fn encode(self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
8282
args.push(SqliteArgumentValue::Blob(self.to_vec()));
8383

@@ -91,13 +91,13 @@ impl<'q> Encode<'q, Sqlite> for Cow<'q, [u8]> {
9191
}
9292
}
9393

94-
impl<'q> Encode<'q, Sqlite> for Arc<[u8]> {
94+
impl Encode<'_, Sqlite> for Arc<[u8]> {
9595
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
9696
<Vec<u8> as Encode<'_, Sqlite>>::encode(self.to_vec(), args)
9797
}
9898
}
9999

100-
impl<'q> Encode<'q, Sqlite> for Rc<[u8]> {
100+
impl Encode<'_, Sqlite> for Rc<[u8]> {
101101
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
102102
<Vec<u8> as Encode<'_, Sqlite>>::encode(self.to_vec(), args)
103103
}

sqlx-sqlite/src/types/float.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl Type<Sqlite> for f32 {
1111
}
1212
}
1313

14-
impl<'q> Encode<'q, Sqlite> for f32 {
14+
impl Encode<'_, Sqlite> for f32 {
1515
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
1616
args.push(SqliteArgumentValue::Double((*self).into()));
1717

@@ -33,7 +33,7 @@ impl Type<Sqlite> for f64 {
3333
}
3434
}
3535

36-
impl<'q> Encode<'q, Sqlite> for f64 {
36+
impl Encode<'_, Sqlite> for f64 {
3737
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
3838
args.push(SqliteArgumentValue::Double(*self));
3939

sqlx-sqlite/src/types/int.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Type<Sqlite> for i8 {
1515
}
1616
}
1717

18-
impl<'q> Encode<'q, Sqlite> for i8 {
18+
impl Encode<'_, Sqlite> for i8 {
1919
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
2020
args.push(SqliteArgumentValue::Int(*self as i32));
2121

@@ -43,7 +43,7 @@ impl Type<Sqlite> for i16 {
4343
}
4444
}
4545

46-
impl<'q> Encode<'q, Sqlite> for i16 {
46+
impl Encode<'_, Sqlite> for i16 {
4747
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
4848
args.push(SqliteArgumentValue::Int(*self as i32));
4949

@@ -67,7 +67,7 @@ impl Type<Sqlite> for i32 {
6767
}
6868
}
6969

70-
impl<'q> Encode<'q, Sqlite> for i32 {
70+
impl Encode<'_, Sqlite> for i32 {
7171
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
7272
args.push(SqliteArgumentValue::Int(*self));
7373

@@ -91,7 +91,7 @@ impl Type<Sqlite> for i64 {
9191
}
9292
}
9393

94-
impl<'q> Encode<'q, Sqlite> for i64 {
94+
impl Encode<'_, Sqlite> for i64 {
9595
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
9696
args.push(SqliteArgumentValue::Int64(*self));
9797

sqlx-sqlite/src/types/str.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Type<Sqlite> for str {
1515
}
1616
}
1717

18-
impl<'q> Encode<'q, Sqlite> for &'q str {
18+
impl Encode<'_, Sqlite> for &'_ str {
1919
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
2020
args.push(SqliteArgumentValue::Text(self.to_string()));
2121

@@ -49,7 +49,7 @@ impl Type<Sqlite> for String {
4949
}
5050
}
5151

52-
impl<'q> Encode<'q, Sqlite> for String {
52+
impl Encode<'_, Sqlite> for String {
5353
fn encode(self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
5454
args.push(SqliteArgumentValue::Text(self));
5555

@@ -69,7 +69,7 @@ impl<'r> Decode<'r, Sqlite> for String {
6969
}
7070
}
7171

72-
impl<'q> Encode<'q, Sqlite> for Cow<'q, str> {
72+
impl Encode<'_, Sqlite> for Cow<'_, str> {
7373
fn encode(self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
7474
args.push(SqliteArgumentValue::Text(self.into()));
7575

@@ -83,13 +83,13 @@ impl<'q> Encode<'q, Sqlite> for Cow<'q, str> {
8383
}
8484
}
8585

86-
impl<'q> Encode<'q, Sqlite> for Arc<str> {
86+
impl Encode<'_, Sqlite> for Arc<str> {
8787
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
8888
<String as Encode<'_, Sqlite>>::encode(self.to_string(), args)
8989
}
9090
}
9191

92-
impl<'q> Encode<'q, Sqlite> for Rc<str> {
92+
impl Encode<'_, Sqlite> for Rc<str> {
9393
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
9494
<String as Encode<'_, Sqlite>>::encode(self.to_string(), args)
9595
}

sqlx-sqlite/src/types/text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl<T> Type<Sqlite> for Text<T> {
1616
}
1717
}
1818

19-
impl<'q, T> Encode<'q, Sqlite> for Text<T>
19+
impl<T> Encode<'_, Sqlite> for Text<T>
2020
where
2121
T: Display,
2222
{

sqlx-sqlite/src/types/uint.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Type<Sqlite> for u8 {
1515
}
1616
}
1717

18-
impl<'q> Encode<'q, Sqlite> for u8 {
18+
impl Encode<'_, Sqlite> for u8 {
1919
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
2020
args.push(SqliteArgumentValue::Int(*self as i32));
2121

@@ -43,7 +43,7 @@ impl Type<Sqlite> for u16 {
4343
}
4444
}
4545

46-
impl<'q> Encode<'q, Sqlite> for u16 {
46+
impl Encode<'_, Sqlite> for u16 {
4747
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
4848
args.push(SqliteArgumentValue::Int(*self as i32));
4949

@@ -67,7 +67,7 @@ impl Type<Sqlite> for u32 {
6767
}
6868
}
6969

70-
impl<'q> Encode<'q, Sqlite> for u32 {
70+
impl Encode<'_, Sqlite> for u32 {
7171
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
7272
args.push(SqliteArgumentValue::Int64(*self as i64));
7373

sqlx-sqlite/src/types/uuid.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl Type<Sqlite> for Uuid {
1919
}
2020
}
2121

22-
impl<'q> Encode<'q, Sqlite> for Uuid {
22+
impl Encode<'_, Sqlite> for Uuid {
2323
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
2424
args.push(SqliteArgumentValue::Blob(self.as_bytes().to_vec()));
2525

@@ -40,7 +40,7 @@ impl Type<Sqlite> for Hyphenated {
4040
}
4141
}
4242

43-
impl<'q> Encode<'q, Sqlite> for Hyphenated {
43+
impl Encode<'_, Sqlite> for Hyphenated {
4444
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
4545
args.push(SqliteArgumentValue::Text(self.to_string()));
4646

@@ -63,7 +63,7 @@ impl Type<Sqlite> for Simple {
6363
}
6464
}
6565

66-
impl<'q> Encode<'q, Sqlite> for Simple {
66+
impl Encode<'_, Sqlite> for Simple {
6767
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue>) -> Result<IsNull, BoxDynError> {
6868
args.push(SqliteArgumentValue::Text(self.to_string()));
6969

0 commit comments

Comments
 (0)