lkml.org 
[lkml]   [2023]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] rust: kernel: str: Implement Debug for CString
    Date
    On 23/07/14 05:01PM, Miguel Ojeda wrote:
    > On Fri, Jul 14, 2023 at 4:02 PM Alice Ryhl <aliceryhl@google.com> wrote:
    > >
    > > Adding some sort of motivation usually works quite well, e.g.:
    > >
    > > Make it possible to use a CString with the `pr_*` macros directly, that
    > > is, instead of
    > >
    > > pr_debug!("trying to open {:?}\n", &*filename);
    > >
    > > we can now write
    > >
    > > pr_debug!("trying to open {:?}\n", filename);
    >
    > Indeed, this would be the most important bit, i.e. answering the "why?".
    >
    > The "what?" and the "how?" are pretty much explained by the title, but
    > it is also fine giving more details (but if the implementation
    > requires an explanation, then it is usually best to write an actual
    > source code comment instead).
    >
    > Cheers,
    > Miguel

    Any follow-up on this? It sure would make my logging cleaner.

    Cheers,
    Ariel
    \
     
     \ /
      Last update: 2023-10-25 18:19    [W:8.719 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site