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]
Message-ID: <CANiq72kRiWoo510U8gkLDpyhNi=a1Ps034Dcid5jvLxJnbNRMQ@mail.gmail.com>
Date: Thu, 5 Dec 2024 12:55:55 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: jens.korinth@...a.io
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, 
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, 
	Rust For Linux <rust-for-linux@...r.kernel.org>, 
	FUJITA Tomonori <fujita.tomonori@...il.com>, Dirk Behme <dirk.behme@...il.com>, 
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 3/3] rust: error: Replace pr_warn by pr_warn_once

On Thu, Dec 5, 2024 at 7:30 AM <jens.korinth@...a.io> wrote:
>
> Sorry for the late response, the usual madness at the end of the year is
> setting in.

No worries at all! I know the feeling... :)

> I think it should be `TryFrom`. The `std::From` doc [1] says:
>
>     Note: This trait must not fail. The From trait is intended for perfect
>     conversions. If the conversion can fail or is not perfect, use TryFrom.
>
> [1]: https://doc.rust-lang.org/std/convert/trait.From.html

Sorry, I am confused. This is not implementing the `From` trait, it is
an inherent implementation.

If what you mean is that this should not be an infallible operation,
then we are back at my previous reply, i.e. are you suggesting to
remove the method? Could you please clarify, perhaps with an example?

Or are you talking about something completely different?

Thanks!

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ