Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work well with older
lock_api
versions
The crate `lock_api` is a transitive dependency, pulled in trough the use of `parking_lot`. `parking_lot` depends on `lock_api` version `^0.4.6`, but only since `lock_api` 0.4.7 the `RwLock::new()` method is available on rust stable, coinciding with the release of rust [1.61][const_fn_trait_bound]. A problem occurs if you try to use `once_map` with non-up-to-date dependencies, e.g. by running ```sh RUSTC_BOOTSTRAP=1 cargo generate-lockfile -Zminimal-versions ``` This PR makes `Shard::new()` non-`const`, so it works with older `lock_api` versions, too.
- Loading branch information