Skip to content

make listener mutable again#9

Merged
zestrada merged 1 commit intomainfrom
listener_mutable
Feb 7, 2025
Merged

make listener mutable again#9
zestrada merged 1 commit intomainfrom
listener_mutable

Conversation

@zestrada
Copy link
Member

@zestrada zestrada commented Feb 7, 2025

Not sure what's going on here, but I get this on some systems:

warning: variable does not need to be mutable
  --> src/main.rs:44:9
   |
44 |     let mut listener = VsockListener::bind(addr)?;
   |         ----^^^^^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

but taking away mut as I did on the last commit leaves us with this on other systems

error[E0596]: cannot borrow `listener` as mutable, as it is not declared as mutable
  --> src/main.rs:59:29
   |
59 |         let (vsock, addr) = listener.accept().await?;
   |                             ^^^^^^^^^^^^^^^^^ cannot borrow as mutable
   |
help: consider changing this to be mutable
   |
44 |     let mut listener = VsockListener::bind(addr)?;
   |         +++

so this PR remakes listener mutable

@zestrada zestrada merged commit fbd79a9 into main Feb 7, 2025
1 check passed
@zestrada zestrada deleted the listener_mutable branch February 7, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant