On Thu, Jul 24, 2025 at 7:05 PM Danilo Krummrich <[email protected]> wrote:
>
> I think I will follow up with a function to perform the conversion in a single
> place, but I really like the idea of a special clippy annotation to tell 
> clippy
> to not warn about unnecessary into() conversions for a specific type alias, 
> such
> as ResourceSize.
>
> Do we agree that we want something like this? Do we even have a feature 
> request
> for this already?

I think we should at least ask -- done here:

    https://github.com/rust-lang/rust-clippy/issues/15337

Though, thinking about it, an explicit function may provide value
nevertheless to clearly see where this happens, and it also means that
when we see `into()` we know it cannot be a no-op.

Having said that, regardless of what we do for that lint, giving more
information to the compiler is generally a good idea, even if only for
notes/diagnostics etc.

Cheers,
Miguel

Reply via email to