Closed vic1707 closed 3 weeks ago
I think its good
lib.rs
use nutype::nutype;
#[nutype(validate(finite))]
struct A(f32);
Cargo.toml
[dependencies]
nutype = { path = "../nutype/nutype" }
cargo expand
@vic1707 Hi thanks for your PRs. Just to keep you update: sorry for the delay. I had seen them and wanted to review over the weekend by did not manage to. I'll try to process them on the next weekend.
No problem take your time π Thanks for telling me
Added the cargo expand
on nightly just to be sure I didn't ruin everything.
Hi @greyblake may I ask for an update ?
Hi, sorry I am on vacation, will be back in 10 days.
On Sun, Sep 29, 2024, 18:21 Victor LEFEBVRE @.***> wrote:
Hi @greyblake https://github.com/greyblake may I ask for an update ?
β Reply to this email directly, view it on GitHub https://github.com/greyblake/nutype/pull/184#issuecomment-2381396546, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA3W2E7SJ4AGSQFV5CHHQTZZALGPAVCNFSM6AAAAABOE6I4NSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRGM4TMNJUGY . You are receiving this because you were mentioned.Message ID: @.***>
Hi @greyblake may I ask for an update ?
@vic1707 Sorry, I'll try to merge this on the weekend.
@vic1707 Thank you for your contribution and again sorry for the delay. I've dropped 2 tiny comments. Let me know if you'd like to address them, if no, I guess I can do it.
@greyblake, just pushed a dryer version, what do you think ?
I thought of doing
let error = cfg_if! {
if #[cfg(ERROR_IN_CORE)] {
quote! { ::core::error::Error }
} else {
quote! { ::std::error::Error }
}
};
instead of the proposed version but it's not yet supported by rust itself, see: https://github.com/rust-lang/rust/issues/15701.
Also, do you think you could publish a new version after this merge ?
@vic1707 Sorry by bad, in my thinking I assumed that we could just use the core::
variant. With a fresh head, I see that it's obviously would be contra-productive and could not work with the older rust versions.
Thank you very much for the very hard try to DRY it.
No problem, it helped me get a dryer version out, win-win π. How about releasing 0.5.1 @greyblake ? Since 0.5.0 we got a few fixes and QOL improvements π
rust 1.81.0 made
std::error::Error
available in core. Users with that version or higher should be getting theError
impl no matter ifstd
feature is enabled. fixes #179 without introducing a breaking change