He intended. &mut Tis a type of its own, so when you mention it as an expression, it moves. You usually don’t notice this, because method calls have their own enumeration rules that give the called temporary mutable borrow value self(to avoid annoying your mutable reference).
source
share