lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 04 Apr 2024 14:41:40 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Alex Gaynor <alex.gaynor@...il.com>, Wedson Almeida Filho <wedsonaf@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...sung.com>, Marco Elver <elver@...gle.com>, Kees Cook <keescook@...omium.org>, Coly Li <colyli@...e.de>, Paolo Abeni <pabeni@...hat.com>, Pierre Gondois <pierre.gondois@....com>, Ingo Molnar <mingo@...nel.org>, Jakub Kicinski <kuba@...nel.org>, Wei Yang <richard.weiyang@...il.com>, Matthew Wilcox <willy@...radead.org>, linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 2/9] rust: list: add tracking for ListArc

On 04.04.24 16:14, Alice Ryhl wrote:
> On Wed, Apr 3, 2024 at 5:52 PM Benno Lossin <benno.lossin@...ton.me> wrote:
>> On 02.04.24 14:16, Alice Ryhl wrote:
>>> +                unsafe { <$fty as $crate::list::ListArcSafe<$num>>::on_create_list_arc_from_unique(
>>> +                        &mut *field
>>> +                ) };
>>
>> Formatting? rustfmt gives me this:
>>
>>                   unsafe {
>>                       <$fty as $crate::list::ListArcSafe<$num>>::on_create_list_arc_from_unique(
>>                           &mut *field
>>                       )
>>                   };
>>
>> (maybe the `;` should be inside the `unsafe` block in this case?)
> 
> I can make the change, but rustfmt does not affect macros.

I think we still should try to format macros correctly, it increases
readability. I take the in-macro code, remove all `$` and other
macro-only symbols, then use rustfmt and then manually format the code
accordingly. I also find it tedious, but the unformatted code also
doesn't look good :)

-- 
Cheers,
Benno


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ