Enable clippy::needless_lifetimes
(#8777)
This PR enables the [`clippy::needless_lifetimes`](https://rust-lang.github.io/rust-clippy/master/index.html#/needless_lifetimes) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
1fa9496334
commit
53630dc74c
13 changed files with 67 additions and 78 deletions
|
@ -138,7 +138,7 @@ impl TestServer {
|
|||
(server, client_a, client_b, channel_id)
|
||||
}
|
||||
|
||||
pub async fn start1<'a>(cx: &'a mut TestAppContext) -> TestClient {
|
||||
pub async fn start1(cx: &mut TestAppContext) -> TestClient {
|
||||
let mut server = Self::start(cx.executor().clone()).await;
|
||||
server.create_client(cx, "user_a").await
|
||||
}
|
||||
|
@ -589,19 +589,19 @@ impl TestClient {
|
|||
.await;
|
||||
}
|
||||
|
||||
pub fn local_projects<'a>(&'a self) -> impl Deref<Target = Vec<Model<Project>>> + 'a {
|
||||
pub fn local_projects(&self) -> impl Deref<Target = Vec<Model<Project>>> + '_ {
|
||||
Ref::map(self.state.borrow(), |state| &state.local_projects)
|
||||
}
|
||||
|
||||
pub fn remote_projects<'a>(&'a self) -> impl Deref<Target = Vec<Model<Project>>> + 'a {
|
||||
pub fn remote_projects(&self) -> impl Deref<Target = Vec<Model<Project>>> + '_ {
|
||||
Ref::map(self.state.borrow(), |state| &state.remote_projects)
|
||||
}
|
||||
|
||||
pub fn local_projects_mut<'a>(&'a self) -> impl DerefMut<Target = Vec<Model<Project>>> + 'a {
|
||||
pub fn local_projects_mut(&self) -> impl DerefMut<Target = Vec<Model<Project>>> + '_ {
|
||||
RefMut::map(self.state.borrow_mut(), |state| &mut state.local_projects)
|
||||
}
|
||||
|
||||
pub fn remote_projects_mut<'a>(&'a self) -> impl DerefMut<Target = Vec<Model<Project>>> + 'a {
|
||||
pub fn remote_projects_mut(&self) -> impl DerefMut<Target = Vec<Model<Project>>> + '_ {
|
||||
RefMut::map(self.state.borrow_mut(), |state| &mut state.remote_projects)
|
||||
}
|
||||
|
||||
|
@ -614,16 +614,14 @@ impl TestClient {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn buffers<'a>(
|
||||
&'a self,
|
||||
) -> impl DerefMut<Target = HashMap<Model<Project>, HashSet<Model<language::Buffer>>>> + 'a
|
||||
pub fn buffers(
|
||||
&self,
|
||||
) -> impl DerefMut<Target = HashMap<Model<Project>, HashSet<Model<language::Buffer>>>> + '_
|
||||
{
|
||||
RefMut::map(self.state.borrow_mut(), |state| &mut state.buffers)
|
||||
}
|
||||
|
||||
pub fn channel_buffers<'a>(
|
||||
&'a self,
|
||||
) -> impl DerefMut<Target = HashSet<Model<ChannelBuffer>>> + 'a {
|
||||
pub fn channel_buffers(&self) -> impl DerefMut<Target = HashSet<Model<ChannelBuffer>>> + '_ {
|
||||
RefMut::map(self.state.borrow_mut(), |state| &mut state.channel_buffers)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue