Re: [PATCH v4] rust: str: add {make,to}_{upper,lower}case() to CString

From: Miguel Ojeda
Date: Tue Feb 20 2024 - 10:46:10 EST


On Tue, Feb 20, 2024 at 3:53 PM Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
>
> Just to clarify, I did not say anything else. As mentioned, I think those
> should not even be warnings.

Well, for things like the `return` one, I find it unlikely it will change.

And for other things that there are 2 ways of doing it, what we
typically want is to have one way of doing it, rather than allowing
both ways.

> I'm happy to do that. We should define the scope for that though. I think this
> should be set globally, or at least not per crate. However, I don't really know
> what's the best way to do that. We could pass '-Aclippy::' to the compiler...

The scope is already defined -- it is global, precisely because we
want to keep all kernel code as consistent as possible.

> Is there any objective reason not to be allowed to be explicit here?

What is not objective about wanting to be consistent? How is your
argument objective if ours isn't?

> Well, I generally agree. However, I'm clearly against *blindly* following
> formatters and linters.
>
> Forcing guidelines we don't have objective reasons for will otherwise just annoy
> people and lead to less ideal code for the project. And I intentionally say "for
> the project", since this context is important.

Who is *blindly* following formatters and linters? We don't have
objective reasons?

I don't appreciate the way you are wording things here.

Does it actually lead to "less ideal code", or the opposite?

Cheers,
Miguel