Skip to content

Commit b320abd

Browse files
committed
removed unnecessary lifetimes
1 parent f717250 commit b320abd

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

src/delete/delete.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl<'a> Delete<'a> {
1616
/// .where_clause("created_at < $1")
1717
/// .and("active = false");
1818
/// ```
19-
pub fn and(mut self, condition: &'a str) -> Self {
19+
pub fn and(mut self, condition: &str) -> Self {
2020
self = self.where_clause(condition);
2121
self
2222
}
@@ -119,7 +119,7 @@ impl<'a> Delete<'a> {
119119
/// delete from users
120120
/// WHERE login = 'foo'
121121
/// ```
122-
pub fn raw(mut self, raw_sql: &'a str) -> Self {
122+
pub fn raw(mut self, raw_sql: &str) -> Self {
123123
push_unique(&mut self._raw, raw_sql.trim().to_owned());
124124
self
125125
}
@@ -143,7 +143,7 @@ impl<'a> Delete<'a> {
143143
/// DELETE FROM users
144144
/// where name = 'Foo'
145145
/// ```
146-
pub fn raw_after(mut self, clause: DeleteClause, raw_sql: &'a str) -> Self {
146+
pub fn raw_after(mut self, clause: DeleteClause, raw_sql: &str) -> Self {
147147
self._raw_after.push((clause, raw_sql.trim().to_owned()));
148148
self
149149
}
@@ -167,14 +167,14 @@ impl<'a> Delete<'a> {
167167
/// delete from users
168168
/// WHERE name = 'Bar'
169169
/// ```
170-
pub fn raw_before(mut self, clause: DeleteClause, raw_sql: &'a str) -> Self {
170+
pub fn raw_before(mut self, clause: DeleteClause, raw_sql: &str) -> Self {
171171
self._raw_before.push((clause, raw_sql.trim().to_owned()));
172172
self
173173
}
174174

175175
/// The returning clause, this method can be used enabling the feature flag `postgresql`
176176
#[cfg(any(doc, feature = "postgresql"))]
177-
pub fn returning(mut self, output_name: &'a str) -> Self {
177+
pub fn returning(mut self, output_name: &str) -> Self {
178178
push_unique(&mut self._returning, output_name.trim().to_owned());
179179
self
180180
}
@@ -189,7 +189,7 @@ impl<'a> Delete<'a> {
189189
/// .delete_from("users")
190190
/// .where_clause("login = 'foo'");
191191
/// ```
192-
pub fn where_clause(mut self, condition: &'a str) -> Self {
192+
pub fn where_clause(mut self, condition: &str) -> Self {
193193
push_unique(&mut self._where, condition.trim().to_owned());
194194
self
195195
}

src/insert/insert.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<'a> Insert<'a> {
145145
/// insert into users (login, name)
146146
/// VALUES ('bar', 'Bar')
147147
/// ```
148-
pub fn raw(mut self, raw_sql: &'a str) -> Self {
148+
pub fn raw(mut self, raw_sql: &str) -> Self {
149149
push_unique(&mut self._raw, raw_sql.trim().to_owned());
150150
self
151151
}
@@ -169,7 +169,7 @@ impl<'a> Insert<'a> {
169169
/// INSERT INTO users (login, name)
170170
/// values ('foo', 'Foo')
171171
/// ```
172-
pub fn raw_after(mut self, clause: InsertClause, raw_sql: &'a str) -> Self {
172+
pub fn raw_after(mut self, clause: InsertClause, raw_sql: &str) -> Self {
173173
self._raw_after.push((clause, raw_sql.trim().to_owned()));
174174
self
175175
}
@@ -193,20 +193,20 @@ impl<'a> Insert<'a> {
193193
/// insert into users (login, name)
194194
/// VALUES ('bar', 'Bar')
195195
/// ```
196-
pub fn raw_before(mut self, clause: InsertClause, raw_sql: &'a str) -> Self {
196+
pub fn raw_before(mut self, clause: InsertClause, raw_sql: &str) -> Self {
197197
self._raw_before.push((clause, raw_sql.trim().to_owned()));
198198
self
199199
}
200200

201201
/// The returning clause, this method can be used enabling the feature flag `postgresql`
202202
#[cfg(any(doc, feature = "postgresql"))]
203-
pub fn returning(mut self, output_name: &'a str) -> Self {
203+
pub fn returning(mut self, output_name: &str) -> Self {
204204
push_unique(&mut self._returning, output_name.trim().to_owned());
205205
self
206206
}
207207

208208
/// The values clause
209-
pub fn values(mut self, value: &'a str) -> Self {
209+
pub fn values(mut self, value: &str) -> Self {
210210
push_unique(&mut self._values, value.trim().to_owned());
211211
self
212212
}

src/select/select.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl<'a> Select<'a> {
1515
/// .where_clause("login = foo")
1616
/// .and("active = true");
1717
/// ```
18-
pub fn and(mut self, condition: &'a str) -> Self {
18+
pub fn and(mut self, condition: &str) -> Self {
1919
self = self.where_clause(condition);
2020
self
2121
}
@@ -100,49 +100,49 @@ impl<'a> Select<'a> {
100100
}
101101

102102
/// The from clause
103-
pub fn from(mut self, tables: &'a str) -> Self {
103+
pub fn from(mut self, tables: &str) -> Self {
104104
push_unique(&mut self._from, tables.trim().to_owned());
105105
self
106106
}
107107

108108
/// The group by clause
109-
pub fn group_by(mut self, column: &'a str) -> Self {
109+
pub fn group_by(mut self, column: &str) -> Self {
110110
push_unique(&mut self._group_by, column.trim().to_owned());
111111
self
112112
}
113113

114114
/// The having clause
115-
pub fn having(mut self, condition: &'a str) -> Self {
115+
pub fn having(mut self, condition: &str) -> Self {
116116
push_unique(&mut self._having, condition.trim().to_owned());
117117
self
118118
}
119119

120120
/// The cross join clause
121-
pub fn cross_join(mut self, table: &'a str) -> Self {
121+
pub fn cross_join(mut self, table: &str) -> Self {
122122
let table = table.trim();
123123
let table = format!("CROSS JOIN {table}");
124124
push_unique(&mut self._join, table);
125125
self
126126
}
127127

128128
/// The inner join clause
129-
pub fn inner_join(mut self, table: &'a str) -> Self {
129+
pub fn inner_join(mut self, table: &str) -> Self {
130130
let table = table.trim();
131131
let table = format!("INNER JOIN {table}");
132132
push_unique(&mut self._join, table);
133133
self
134134
}
135135

136136
/// The left join clause
137-
pub fn left_join(mut self, table: &'a str) -> Self {
137+
pub fn left_join(mut self, table: &str) -> Self {
138138
let table = table.trim();
139139
let table = format!("LEFT JOIN {table}");
140140
push_unique(&mut self._join, table);
141141
self
142142
}
143143

144144
/// The right join clause
145-
pub fn right_join(mut self, table: &'a str) -> Self {
145+
pub fn right_join(mut self, table: &str) -> Self {
146146
let table = table.trim();
147147
let table = format!("RIGHT JOIN {table}");
148148
push_unique(&mut self._join, table);
@@ -198,7 +198,7 @@ impl<'a> Select<'a> {
198198
}
199199

200200
/// The order by clause
201-
pub fn order_by(mut self, column: &'a str) -> Self {
201+
pub fn order_by(mut self, column: &str) -> Self {
202202
push_unique(&mut self._order_by, column.trim().to_owned());
203203
self
204204
}
@@ -230,7 +230,7 @@ impl<'a> Select<'a> {
230230
/// select * from users u inner join address addr on u.login = addr.owner_login
231231
/// WHERE u.login = foo
232232
/// ```
233-
pub fn raw(mut self, raw_sql: &'a str) -> Self {
233+
pub fn raw(mut self, raw_sql: &str) -> Self {
234234
push_unique(&mut self._raw, raw_sql.trim().to_owned());
235235
self
236236
}
@@ -258,7 +258,7 @@ impl<'a> Select<'a> {
258258
/// inner join address addr on u.login = addr.owner_login
259259
/// WHERE u.login = foo
260260
/// ```
261-
pub fn raw_after(mut self, clause: SelectClause, raw_sql: &'a str) -> Self {
261+
pub fn raw_after(mut self, clause: SelectClause, raw_sql: &str) -> Self {
262262
self._raw_after.push((clause, raw_sql.trim().to_owned()));
263263
self
264264
}
@@ -284,13 +284,13 @@ impl<'a> Select<'a> {
284284
/// from users u inner join address addr on u.login = addr.owner_login
285285
/// WHERE u.login = foo
286286
/// ```
287-
pub fn raw_before(mut self, clause: SelectClause, raw_sql: &'a str) -> Self {
287+
pub fn raw_before(mut self, clause: SelectClause, raw_sql: &str) -> Self {
288288
self._raw_before.push((clause, raw_sql.trim().to_owned()));
289289
self
290290
}
291291

292292
/// The select clause
293-
pub fn select(mut self, column: &'a str) -> Self {
293+
pub fn select(mut self, column: &str) -> Self {
294294
push_unique(&mut self._select, column.trim().to_owned());
295295
self
296296
}
@@ -312,7 +312,7 @@ impl<'a> Select<'a> {
312312
/// .from("users")
313313
/// .where_clause("login = $1");
314314
/// ```
315-
pub fn where_clause(mut self, condition: &'a str) -> Self {
315+
pub fn where_clause(mut self, condition: &str) -> Self {
316316
push_unique(&mut self._where, condition.trim().to_owned());
317317
self
318318
}

src/update/update.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl<'a> Update<'a> {
1717
/// .where_clause("login = $2")
1818
/// .and("active = true");
1919
/// ```
20-
pub fn and(mut self, condition: &'a str) -> Self {
20+
pub fn and(mut self, condition: &str) -> Self {
2121
self = self.where_clause(condition);
2222
self
2323
}
@@ -72,7 +72,7 @@ impl<'a> Update<'a> {
7272

7373
/// The from clause, this method can be used enabling the feature flag `postgresql`
7474
#[cfg(any(doc, feature = "postgresql"))]
75-
pub fn from(mut self, tables: &'a str) -> Self {
75+
pub fn from(mut self, tables: &str) -> Self {
7676
push_unique(&mut self._from, tables.trim().to_owned());
7777
self
7878
}
@@ -109,7 +109,7 @@ impl<'a> Update<'a> {
109109
/// update users
110110
/// SET login = 'foo'
111111
/// ```
112-
pub fn raw(mut self, raw_sql: &'a str) -> Self {
112+
pub fn raw(mut self, raw_sql: &str) -> Self {
113113
push_unique(&mut self._raw, raw_sql.trim().to_owned());
114114
self
115115
}
@@ -133,7 +133,7 @@ impl<'a> Update<'a> {
133133
/// UPDATE users
134134
/// set name = 'Foo'
135135
/// ```
136-
pub fn raw_after(mut self, clause: UpdateClause, raw_sql: &'a str) -> Self {
136+
pub fn raw_after(mut self, clause: UpdateClause, raw_sql: &str) -> Self {
137137
self._raw_after.push((clause, raw_sql.trim().to_owned()));
138138
self
139139
}
@@ -157,20 +157,20 @@ impl<'a> Update<'a> {
157157
/// update users
158158
/// SET name = 'Bar'
159159
/// ```
160-
pub fn raw_before(mut self, clause: UpdateClause, raw_sql: &'a str) -> Self {
160+
pub fn raw_before(mut self, clause: UpdateClause, raw_sql: &str) -> Self {
161161
self._raw_before.push((clause, raw_sql.trim().to_owned()));
162162
self
163163
}
164164

165165
/// The returning clause, this method can be used enabling the feature flag `postgresql`
166166
#[cfg(any(doc, feature = "postgresql"))]
167-
pub fn returning(mut self, output_name: &'a str) -> Self {
167+
pub fn returning(mut self, output_name: &str) -> Self {
168168
push_unique(&mut self._returning, output_name.trim().to_owned());
169169
self
170170
}
171171

172172
/// The set clause
173-
pub fn set(mut self, value: &'a str) -> Self {
173+
pub fn set(mut self, value: &str) -> Self {
174174
push_unique(&mut self._set, value.trim().to_owned());
175175
self
176176
}
@@ -204,7 +204,7 @@ impl<'a> Update<'a> {
204204
/// .set("name = $1")
205205
/// .where_clause("login = $2");
206206
/// ```
207-
pub fn where_clause(mut self, condition: &'a str) -> Self {
207+
pub fn where_clause(mut self, condition: &str) -> Self {
208208
push_unique(&mut self._where, condition.trim().to_owned());
209209
self
210210
}

0 commit comments

Comments
 (0)