clippy
This commit is contained in:
parent
2eb398efa9
commit
9d0f7e3917
@ -111,7 +111,7 @@ impl CaseStyleHelpers for Ident {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'meta> TryFrom<&ParseNestedMeta<'meta>> for CaseStyle {
|
||||
impl TryFrom<&ParseNestedMeta<'_>> for CaseStyle {
|
||||
type Error = syn::Error;
|
||||
|
||||
fn try_from(value: &ParseNestedMeta) -> Result<Self, Self::Error> {
|
||||
|
@ -31,7 +31,7 @@ impl<'a> MetricStream<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Stream for MetricStream<'a> {
|
||||
impl Stream for MetricStream<'_> {
|
||||
type Item = Result<QueryResult, DbErr>;
|
||||
|
||||
fn poll_next(
|
||||
@ -51,7 +51,7 @@ impl<'a> Stream for MetricStream<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Drop for MetricStream<'a> {
|
||||
impl Drop for MetricStream<'_> {
|
||||
fn drop(&mut self) {
|
||||
if let (Some(callback), Some(elapsed)) = (self.metric_callback.as_deref(), self.elapsed) {
|
||||
let info = crate::metric::Info {
|
||||
|
@ -27,20 +27,20 @@ pub struct TransactionStream<'a> {
|
||||
stream: MetricStream<'this>,
|
||||
}
|
||||
|
||||
impl<'a> std::fmt::Debug for TransactionStream<'a> {
|
||||
impl std::fmt::Debug for TransactionStream<'_> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "TransactionStream")
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> TransactionStream<'a> {
|
||||
impl TransactionStream<'_> {
|
||||
#[instrument(level = "trace", skip(metric_callback))]
|
||||
#[allow(unused_variables)]
|
||||
pub(crate) fn build(
|
||||
conn: MutexGuard<'a, InnerConnection>,
|
||||
conn: MutexGuard<'_, InnerConnection>,
|
||||
stmt: Statement,
|
||||
metric_callback: Option<crate::metric::Callback>,
|
||||
) -> TransactionStream<'a> {
|
||||
) -> TransactionStream<'_> {
|
||||
TransactionStreamBuilder {
|
||||
stmt,
|
||||
conn,
|
||||
@ -98,7 +98,7 @@ impl<'a> TransactionStream<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Stream for TransactionStream<'a> {
|
||||
impl Stream for TransactionStream<'_> {
|
||||
type Item = Result<QueryResult, DbErr>;
|
||||
|
||||
fn poll_next(
|
||||
|
@ -20,7 +20,7 @@ where
|
||||
A: ActiveModelTrait,
|
||||
{
|
||||
/// Execute a DELETE operation on one ActiveModel
|
||||
pub fn exec<C>(self, db: &'a C) -> impl Future<Output = Result<DeleteResult, DbErr>> + '_
|
||||
pub fn exec<C>(self, db: &'a C) -> impl Future<Output = Result<DeleteResult, DbErr>> + 'a
|
||||
where
|
||||
C: ConnectionTrait,
|
||||
{
|
||||
@ -34,7 +34,7 @@ where
|
||||
E: EntityTrait,
|
||||
{
|
||||
/// Execute a DELETE operation on many ActiveModels
|
||||
pub fn exec<C>(self, db: &'a C) -> impl Future<Output = Result<DeleteResult, DbErr>> + '_
|
||||
pub fn exec<C>(self, db: &'a C) -> impl Future<Output = Result<DeleteResult, DbErr>> + 'a
|
||||
where
|
||||
C: ConnectionTrait,
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ where
|
||||
{
|
||||
/// Execute an insert operation
|
||||
#[allow(unused_mut)]
|
||||
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + '_
|
||||
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + 'a
|
||||
where
|
||||
C: ConnectionTrait,
|
||||
A: 'a,
|
||||
@ -134,7 +134,7 @@ where
|
||||
pub fn exec_without_returning<'a, C>(
|
||||
self,
|
||||
db: &'a C,
|
||||
) -> impl Future<Output = Result<u64, DbErr>> + '_
|
||||
) -> impl Future<Output = Result<u64, DbErr>> + 'a
|
||||
where
|
||||
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
|
||||
C: ConnectionTrait,
|
||||
@ -147,7 +147,7 @@ where
|
||||
pub fn exec_with_returning<'a, C>(
|
||||
self,
|
||||
db: &'a C,
|
||||
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + '_
|
||||
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + 'a
|
||||
where
|
||||
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
|
||||
C: ConnectionTrait,
|
||||
@ -171,7 +171,7 @@ where
|
||||
}
|
||||
|
||||
/// Execute an insert operation, returning the last inserted id
|
||||
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + '_
|
||||
pub fn exec<'a, C>(self, db: &'a C) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + 'a
|
||||
where
|
||||
C: ConnectionTrait,
|
||||
A: 'a,
|
||||
@ -183,7 +183,7 @@ where
|
||||
pub fn exec_without_returning<'a, C>(
|
||||
self,
|
||||
db: &'a C,
|
||||
) -> impl Future<Output = Result<u64, DbErr>> + '_
|
||||
) -> impl Future<Output = Result<u64, DbErr>> + 'a
|
||||
where
|
||||
C: ConnectionTrait,
|
||||
A: 'a,
|
||||
@ -195,7 +195,7 @@ where
|
||||
pub fn exec_with_returning<'a, C>(
|
||||
self,
|
||||
db: &'a C,
|
||||
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + '_
|
||||
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + 'a
|
||||
where
|
||||
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
|
||||
C: ConnectionTrait,
|
||||
|
Loading…
x
Reference in New Issue
Block a user