Fix unnecessary-mut-passed lint (#36490)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 16:20:01 +02:00 committed by GitHub
parent e3b593efbd
commit c4083b9b63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 103 additions and 104 deletions

View file

@ -372,7 +372,7 @@ impl HeadlessProject {
mut cx: AsyncApp,
) -> Result<proto::AddWorktreeResponse> {
use client::ErrorCodeExt;
let fs = this.read_with(&mut cx, |this, _| this.fs.clone())?;
let fs = this.read_with(&cx, |this, _| this.fs.clone())?;
let path = PathBuf::from_proto(shellexpand::tilde(&message.payload.path).to_string());
let canonicalized = match fs.canonicalize(&path).await {
@ -396,7 +396,7 @@ impl HeadlessProject {
};
let worktree = this
.read_with(&mut cx.clone(), |this, _| {
.read_with(&cx.clone(), |this, _| {
Worktree::local(
Arc::from(canonicalized.as_path()),
message.payload.visible,
@ -407,7 +407,7 @@ impl HeadlessProject {
})?
.await?;
let response = this.read_with(&mut cx, |_, cx| {
let response = this.read_with(&cx, |_, cx| {
let worktree = worktree.read(cx);
proto::AddWorktreeResponse {
worktree_id: worktree.id().to_proto(),
@ -586,7 +586,7 @@ impl HeadlessProject {
let buffer_store = this.read_with(&cx, |this, _| this.buffer_store.clone())?;
while let Ok(buffer) = results.recv().await {
let buffer_id = buffer.read_with(&mut cx, |this, _| this.remote_id())?;
let buffer_id = buffer.read_with(&cx, |this, _| this.remote_id())?;
response.buffer_ids.push(buffer_id.to_proto());
buffer_store
.update(&mut cx, |buffer_store, cx| {

View file

@ -622,7 +622,7 @@ pub fn execute_proxy(identifier: String, is_reconnecting: bool) -> Result<()> {
Err(anyhow!(error))?;
}
n => {
stderr.write_all(&mut stderr_buffer[..n]).await?;
stderr.write_all(&stderr_buffer[..n]).await?;
stderr.flush().await?;
}
}