rasn icon indicating copy to clipboard operation
rasn copied to clipboard

`Oid` is const constructable since Rust 1.58.0

Open repnop opened this issue 3 years ago • 1 comments

Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3f86d7648af09a1fb561b0c510fe0c9e

I didn't notice any MSRV policy, but if you're not concerned with supporting older Rust versions, ConstOid can be removed and replaced with const associated functions on Oid now 🎉 Option::unwrap still isn't const however its trivial to create a function to do the same thing as shown in the playground link, so I don't think that's really a blocker since its on the user's end.

repnop avatar Feb 07 '22 18:02 repnop

@XAMPPRocky what would you like done with ConstOid in a PR for this? the oids! macro currently creates ConstOids, so changing those over would currently be a breaking change, but if that's going to happen I think that completely removing the type might as well happen at the same time since the version would need bumped anyway, but alternatively could leave it and the macro alone right now and simply #[deprecate(...)] ConstOid to start moving people over

repnop avatar Jul 21 '22 18:07 repnop

Thank you for your issue! Sorry not replying. I would welcome a PR that moves everything over to Oid.

XAMPPRocky avatar Jul 18 '23 07:07 XAMPPRocky