Re: [PATCH RESEND v2] rust: regulator: add a bare minimum regulator abstraction
From: Danilo Krummrich
Date: Thu Mar 27 2025 - 07:53:01 EST
On Thu, Mar 27, 2025 at 08:46:29AM -0300, Daniel Almeida wrote:
> Any function that takes 'self' by value (i.e.: “self" instead of “&self” )
> effectively kills it.
I'm sure Daniel didn't mean it that way, but to avoid confusion, I want to
clarify that a function that takes `self` as argument not necessarily results in
`self` being destroyed. It could be moved into some other structure, directly
returned by the same function etc.
It's just that if the functions lets `self` go out of scope, then it's
destroyed.