chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795)
While this lint is allow-by-default, it seems pretty useful to get rid of mutable borrows when they're not needed. Closes #ISSUE Release Notes: - N/A
This commit is contained in:
1 parent
058ec5cd6d
commit
72de8702ae
36 files changed
+158
-204
No files matched your search
@@ -188,7 +188,7 @@ impl ChannelForwarder {
|
||||
fn new(
|
||||
mut incoming_tx: UnboundedSender<Envelope>,
|
||||
mut outgoing_rx: UnboundedReceiver<Envelope>,
|
||||
cx: &mut AsyncAppContext,
|
||||
cx: &AsyncAppContext,
|
||||
) -> (Self, UnboundedSender<Envelope>, UnboundedReceiver<Envelope>) {
|
||||
let (quit_tx, mut quit_rx) = mpsc::unbounded::<()>();
|
||||
|
||||
@@ -298,7 +298,7 @@ impl SshRemoteClient {
|
||||
Ok(this)
|
||||
}
|
||||
|
||||
fn reconnect(this: Arc<Self>, cx: &mut AsyncAppContext) -> Result<()> {
|
||||
fn reconnect(this: Arc<Self>, cx: &AsyncAppContext) -> Result<()> {
|
||||
let Some(state) = this.inner_state.lock().take() else {
|
||||
return Err(anyhow!("reconnect is already in progress"));
|
||||
};
|
||||
@@ -355,7 +355,7 @@ impl SshRemoteClient {
|
||||
mut ssh_process: Child,
|
||||
incoming_tx: UnboundedSender<Envelope>,
|
||||
mut outgoing_rx: UnboundedReceiver<Envelope>,
|
||||
cx: &mut AsyncAppContext,
|
||||
cx: &AsyncAppContext,
|
||||
) -> Task<Result<()>> {
|
||||
let mut child_stderr = ssh_process.stderr.take().unwrap();
|
||||
let mut child_stdout = ssh_process.stdout.take().unwrap();
|
||||
|
||||
Reference in new issue
Block a user