this post was submitted on 14 Jun 2023
1 points (100.0% liked)

Rust: Support

5 readers
1 users here now

Rules

founded 1 year ago
MODERATORS
 

I've been using lazy_static until now but was trying to migrate to OnceCell. It seems I can't have a OnceCell even though I'm never calling mutable methods on the regex. I'm not even using multiple threads.

The error I'm getting is:

Any way to solve this or do I have to use OnceLock / continue using lazy_static? I don't want to add the overhead of using OnceLock if not necessary.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here