Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: temporary value dropped while borrowed #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Pencil-Yao
Copy link
Contributor

compiling bug

line number if from old version

error[E0716]: temporary value dropped while borrowed
   --> /home/ypf/.cargo/git/checkouts/tentacle-ac0fddddf0c1bd2b/f71c143/tentacle/src/protocol_handle_stream.rs:252:28
    |
239 | /             tokio::select! {
240 | |                 event = self.receiver.next() => {
241 | |                     match event {
242 | |                         Some(event) => self.handle_event(event).await,
...   |
252 | |                 res = &mut self.handle.poll(&mut self.handle_context), if self.need_poll => {
    | |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
...   |
256 | |                 else => break
257 | |             }
    | |             -
    | |             |
    | |_____________temporary value is freed at the end of this statement
    |               borrow later used here
    |
    = note: consider using a `let` binding to create a longer lived value

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