ureq icon indicating copy to clipboard operation
ureq copied to clipboard

Use std::sync::OnceLock instead of once_cell::sync::Lazy

Open rgret-dev opened this issue 1 year ago • 3 comments

This PR removes the once_cell dependency and uses the std struct instead. MSRV would go up to 1.70

See:

  • https://doc.rust-lang.org/std/sync/struct.OnceLock.html
  • https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html#oncecell-and-oncelock

rgret-dev avatar Feb 10 '24 02:02 rgret-dev

Hi @rmg-x, welcome to ureq!

I do agree it would be nice to do this, but at this point we can't bump the MSRV. We decided on a rather conservative version requirement since our users have that need. See this issue from just two weeks ago: https://github.com/algesten/ureq/issues/712 - this was due to trying to use let-else syntax.

algesten avatar Feb 16 '24 05:02 algesten

Second the msrv concern, other than just being simple and correct, the reason I use ureq is because it builds on my target msrv 1.63.0

DanGould avatar Mar 26 '24 15:03 DanGould

I can understand the concerns (because who wants their project to break?) but personally think it's the wrong approach for this library.

Eventually there will be a point where the MSRV is bumped and users will complain. I think it makes more sense to put the onus on people requiring a lower version (e.g. fork or use an older ureq version)

Regardless, I appreciate the responses and will leave the PR open, feel free to close it.

rgret-dev avatar Mar 27 '24 11:03 rgret-dev

Closing since we are moving to 3.x

algesten avatar Aug 13 '24 17:08 algesten