Skip to content
Discussion options

You must be logged in to vote

Hi. Can you paste the full error message? This would help to identify exactly:

  • which variable is being used twice
  • what type it has
  • where exactly is it being moved

If I were to guess, it looks like where_condition.add( consumes (moves) the condition (self) and returns the updated condition back, rather than modifies the condition by reference (&mut self). You need to assign the updated condition back to the variable: where_condition = where_condition.add(. Your original code would be OK if that method accepted &mut self.

Perhaps, AI could guide you too, if you pasted your full function and the full error message into the prompt

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@rsurkin
Comment options

@rsurkin
Comment options

@Expurple
Comment options

Answer selected by rsurkin
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants