fix: clippy warnings with --all-features (#15035)

# Description

Some more `cargo clippy --all-features` warnings from rust toolchain
1.84.1 that I forgot to fix in #14984
This commit is contained in:
zc he
2025-02-07 19:30:25 +08:00
committed by GitHub
parent 2ce5de58e6
commit fb8ac4198b
8 changed files with 13 additions and 13 deletions

View File

@ -84,7 +84,7 @@ impl<'a> PluginExecutionCommandContext<'a> {
}
}
impl<'a> PluginExecutionContext for PluginExecutionCommandContext<'a> {
impl PluginExecutionContext for PluginExecutionCommandContext<'_> {
fn span(&self) -> Span {
self.call.head
}

View File

@ -5,7 +5,7 @@ pub enum MutableCow<'a, T> {
Owned(T),
}
impl<'a, T: Clone> MutableCow<'a, T> {
impl<T: Clone> MutableCow<'_, T> {
pub fn owned(&self) -> MutableCow<'static, T> {
match self {
MutableCow::Borrowed(r) => MutableCow::Owned((*r).clone()),
@ -14,7 +14,7 @@ impl<'a, T: Clone> MutableCow<'a, T> {
}
}
impl<'a, T> std::ops::Deref for MutableCow<'a, T> {
impl<T> std::ops::Deref for MutableCow<'_, T> {
type Target = T;
fn deref(&self) -> &T {
@ -25,7 +25,7 @@ impl<'a, T> std::ops::Deref for MutableCow<'a, T> {
}
}
impl<'a, T> std::ops::DerefMut for MutableCow<'a, T> {
impl<T> std::ops::DerefMut for MutableCow<'_, T> {
fn deref_mut(&mut self) -> &mut Self::Target {
match self {
MutableCow::Borrowed(r) => r,